llvm.org GIT mirror llvm / 3fb0089
Make SourceManager::createFileID(UnownedTag, ...) take a const llvm::MemoryBuffer* Requires making the llvm::MemoryBuffer* stored by SourceManager const, which in turn requires making the accessors for that return const llvm::MemoryBuffer*s and updating all call sites. The original motivation for this was to use it and fix the TODO in CodeGenAction.cpp's ConvertBackendLocation() by using the UnownedTag version of createFileID, and since llvm::SourceMgr* hands out a const llvm::MemoryBuffer* this is required. I'm not sure if fixing the TODO this way actually works, but this seems like a good change on its own anyways. No intended behavior change. Differential Revision: https://reviews.llvm.org/D60247 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357724 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Weber 1 year, 4 months ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
263263
264264 public:
265265 MemoryBufferRef() = default;
266 MemoryBufferRef(MemoryBuffer& Buffer)
266 MemoryBufferRef(const MemoryBuffer& Buffer)
267267 : Buffer(Buffer.getBuffer()), Identifier(Buffer.getBufferIdentifier()) {}
268268 MemoryBufferRef(StringRef Buffer, StringRef Identifier)
269269 : Buffer(Buffer), Identifier(Identifier) {}