diff options
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 8954c8f..32894f2 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -678,6 +678,13 @@ void SourceManager::disableFileContentsOverride(const FileEntry *File) { OverriddenFilesInfo->OverriddenFilesWithBuffer.erase(File); } +void SourceManager::embedFileContentsInModule(const FileEntry *File) { + // We model an embedded file as a file whose buffer has been overridden + // by its contents as they are now. + const SrcMgr::ContentCache *CC = getOrCreateContentCache(File); + const_cast<SrcMgr::ContentCache *>(CC)->BufferOverridden = true; +} + StringRef SourceManager::getBufferData(FileID FID, bool *Invalid) const { bool MyInvalid = false; const SLocEntry &SLoc = getSLocEntry(FID, &MyInvalid); |