mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
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 llvm-svn: 357724
This commit is contained in:
parent
c534358a90
commit
97276e6344
@ -264,7 +264,7 @@ class MemoryBufferRef {
|
||||
|
||||
public:
|
||||
MemoryBufferRef() = default;
|
||||
MemoryBufferRef(MemoryBuffer& Buffer)
|
||||
MemoryBufferRef(const MemoryBuffer& Buffer)
|
||||
: Buffer(Buffer.getBuffer()), Identifier(Buffer.getBufferIdentifier()) {}
|
||||
MemoryBufferRef(StringRef Buffer, StringRef Identifier)
|
||||
: Buffer(Buffer), Identifier(Identifier) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user