diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-11-01 00:46:54 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-11-01 00:46:54 +0000 |
commit | 17f00260ab6fa8a6d7b42d9bef89fc8879355ffd (patch) | |
tree | 1916863177a7df2f4a3ffc76766f8aeb5f01df07 /clang/lib/Lex/ModuleMap.cpp | |
parent | 32c0c85382ab63ff38f58b41e904bbfe733d9a60 (diff) | |
download | bcm5719-llvm-17f00260ab6fa8a6d7b42d9bef89fc8879355ffd.tar.gz bcm5719-llvm-17f00260ab6fa8a6d7b42d9bef89fc8879355ffd.zip |
Fix regression in behavior of clang -x c++-header -fmodule-name=XXX
-fsyntax-only.
The driver accidentally stopped passing the input filenames on to -cc1
in this mode due to confusion over what action was being requested.
This change also fixes a couple of crashes I encountered when passing
multiple files to such a -cc1 invocation.
llvm-svn: 345803
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r-- | clang/lib/Lex/ModuleMap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index d44bf124ffc..13d2b728f58 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -523,7 +523,7 @@ void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, // At this point, only non-modular includes remain. - if (LangOpts.ModulesStrictDeclUse) { + if (RequestingModule && LangOpts.ModulesStrictDeclUse) { Diags.Report(FilenameLoc, diag::err_undeclared_use_of_module) << RequestingModule->getTopLevelModule()->Name << Filename; } else if (RequestingModule && RequestingModuleIsModuleInterface && |