From 919ce235665865029d754d9b18fad5d0084aaef1 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 24 Nov 2015 04:22:21 +0000 Subject: [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 --- clang/lib/Basic/SourceManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Basic/SourceManager.cpp') diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 734f2042b78..7abcba1fb73 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; } -- cgit v1.2.3