summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-07-17 01:19:54 +0000
committerAdrian Prantl <aprantl@apple.com>2015-07-17 01:19:54 +0000
commitfb2398d0c43405a6b654c80560e38fb3ccd134b9 (patch)
treee1a0f288169e920a3ac6d9f2aaece67eb7796bf1 /clang/lib/Frontend/CompilerInvocation.cpp
parentcabe02e14110526189a0935d172f8547f0232572 (diff)
downloadbcm5719-llvm-fb2398d0c43405a6b654c80560e38fb3ccd134b9.tar.gz
bcm5719-llvm-fb2398d0c43405a6b654c80560e38fb3ccd134b9.zip
Make the clang module container format selectable from the command line.
- introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! llvm-svn: 242499
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 6f13faf573b..f325144fd08 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1112,6 +1112,8 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
getLastArgUInt64Value(Args, OPT_fbuild_session_timestamp, 0);
Opts.ModulesValidateSystemHeaders =
Args.hasArg(OPT_fmodules_validate_system_headers);
+ if (const Arg *A = Args.getLastArg(OPT_fmodule_format_EQ))
+ Opts.ModuleFormat = A->getValue();
for (const Arg *A : Args.filtered(OPT_fmodules_ignore_macro)) {
StringRef MacroDef = A->getValue();
OpenPOWER on IntegriCloud