aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-11-24 04:22:21 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-11-24 04:22:21 +0000
commit919ce235665865029d754d9b18fad5d0084aaef1 (patch)
tree9fbf1ffb708303aa64f490a3f1cd85ff53eeb24d /clang/lib/Basic/SourceManager.cpp
parent50668455a72c9ec35b26d76d873b692ac9f21367 (diff)
downloadllvm-919ce235665865029d754d9b18fad5d0084aaef1.zip
llvm-919ce235665865029d754d9b18fad5d0084aaef1.tar.gz
llvm-919ce235665865029d754d9b18fad5d0084aaef1.tar.bz2
[modules] Add -cc1 flag -fmodules-embed-all-files.
This flag causes all files that were read by the compilation to be embedded into a produced module file. This is useful for distributed build systems that use an include scanning system to determine which files are "needed" by a compilation, and only provide those files to remote compilation workers. Since using a module can require any file that is part of that module (or anything it transitively includes), files that are not found by an include scanner can be required in a regular build using explicit modules. With this flag, only files that are actually referenced by transitively-#included files are required to be present on the build machine. llvm-svn: 253950
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 734f204..7abcba1 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -361,7 +361,7 @@ LineTableInfo &SourceManager::getLineTable() {
SourceManager::SourceManager(DiagnosticsEngine &Diag, FileManager &FileMgr,
bool UserFilesAreVolatile)
: Diag(Diag), FileMgr(FileMgr), OverridenFilesKeepOriginalName(true),
- UserFilesAreVolatile(UserFilesAreVolatile),
+ UserFilesAreVolatile(UserFilesAreVolatile), FilesAreTransient(false),
ExternalSLocEntries(nullptr), LineTable(nullptr), NumLinearScans(0),
NumBinaryProbes(0) {
clearIDTables();
@@ -439,6 +439,7 @@ SourceManager::getOrCreateContentCache(const FileEntry *FileEnt,
}
Entry->IsSystemFile = isSystemFile;
+ Entry->BufferOverridden = FilesAreTransient;
return Entry;
}