diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-09-11 03:58:07 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-09-11 03:58:07 +0000 |
commit | 7acebe4cf1f69d1723e9ae93dc324b9860de04c0 (patch) | |
tree | a493be6fc9f4461efceb3fb89e7bb548fbb4991b /clang/lib/Driver/Tools.cpp | |
parent | 8385ea602d467af5e695fbe30f38bd39a1d0d157 (diff) | |
download | llvm-7acebe4cf1f69d1723e9ae93dc324b9860de04c0.zip llvm-7acebe4cf1f69d1723e9ae93dc324b9860de04c0.tar.gz llvm-7acebe4cf1f69d1723e9ae93dc324b9860de04c0.tar.bz2 |
[modules] Don't load files specified by -fmodule-file= when modules are
disabled. (We still allow this via -cc1 / -Xclang, primarily for testing.)
llvm-svn: 247384
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 7c85985..b83f3fa 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -4461,7 +4461,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgs(CmdArgs, options::OPT_fmodule_map_file); // -fmodule-file can be used to specify files containing precompiled modules. - Args.AddAllArgs(CmdArgs, options::OPT_fmodule_file); + if (HaveModules) + Args.AddAllArgs(CmdArgs, options::OPT_fmodule_file); + else + Args.ClaimAllArgs(options::OPT_fmodule_file); // -fmodule-cache-path specifies where our implicitly-built module files // should be written. |