forked from OSchip/llvm-project
Add possibility to specify an include location for createFileIDForMemBuffer().
Useful to set up a virtual include hierarchy, e.g. to order diagnostics for ambiguous overloads from MemoryBuffers. llvm-svn: 143347
This commit is contained in:
parent
4c042fe667
commit
a24f2c8875
|
@ -641,8 +641,9 @@ public:
|
|||
/// specified memory buffer. This does no caching of the buffer and takes
|
||||
/// ownership of the MemoryBuffer, so only pass a MemoryBuffer to this once.
|
||||
FileID createFileIDForMemBuffer(const llvm::MemoryBuffer *Buffer,
|
||||
int LoadedID = 0, unsigned LoadedOffset = 0) {
|
||||
return createFileID(createMemBufferContentCache(Buffer), SourceLocation(),
|
||||
int LoadedID = 0, unsigned LoadedOffset = 0,
|
||||
SourceLocation IncludeLoc = SourceLocation()) {
|
||||
return createFileID(createMemBufferContentCache(Buffer), IncludeLoc,
|
||||
SrcMgr::C_User, LoadedID, LoadedOffset);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue