summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-14 05:02:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-14 05:02:58 +0000
commitc1f5dc002f2837a5cfc39933b8df254dde6aa354 (patch)
tree597ab6a27c6c698fe7d9ce730a5aacb358989afe /include/clang/Basic
parentdbe3712f62fc845cf06209f1a488b87b2c9dc96c (diff)
[modules] Add an experimental -cc1 feature to embed the contents of an input
file in the .pcm files. This allows a smaller set of files to be sent to a remote build worker when building with explicit modules (for instance, module map files need not be sent along with the corresponding precompiled modules). This doesn't actually make the embedded files visible to header search, so it's not useful as a packaging format for public header files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticFrontendKinds.td3
-rw-r--r--include/clang/Basic/SourceManager.h7
2 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td
index 33b660d8db..66c17f104c 100644
--- a/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -200,6 +200,9 @@ def remark_module_build : Remark<"building module '%0' as '%1'">,
InGroup<ModuleBuild>;
def remark_module_build_done : Remark<"finished building module '%0'">,
InGroup<ModuleBuild>;
+def err_modules_embed_file_not_found :
+ Error<"file '%0' specified by '-fmodules-embed-file=' not found">,
+ DefaultFatal;
def err_conflicting_module_names : Error<
"conflicting module names specified: '-fmodule-name=%0' and "
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index bc10cc836e..ec8903e139 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -851,6 +851,13 @@ public:
/// This should be called before parsing has begun.
void disableFileContentsOverride(const FileEntry *File);
+ /// \brief Request that the contents of the given source file are written
+ /// to a created module file if they are used in this compilation. This
+ /// removes the requirement that the file still exist when the module is used
+ /// (but does not make the file visible to header search and the like when
+ /// the module is used).
+ void embedFileContentsInModule(const FileEntry *SourceFile);
+
//===--------------------------------------------------------------------===//
// FileID manipulation methods.
//===--------------------------------------------------------------------===//