diff options
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 4 | ||||
-rw-r--r-- | clang/test/Modules/explicit-build-missing-files.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 4312c89d0a7..59ea27c5868 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1678,7 +1678,9 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, // FIXME: Remove this; loadModule does the same check (but produces // slightly worse diagnostics). if (!SuggestedModule.getModule()->isAvailable() && - !SuggestedModule.getModule()->HasIncompatibleModuleFile) { + !SuggestedModule.getModule() + ->getTopLevelModule() + ->HasIncompatibleModuleFile) { clang::Module::Requirement Requirement; clang::Module::UnresolvedHeaderDirective MissingHeader; Module *M = SuggestedModule.getModule(); diff --git a/clang/test/Modules/explicit-build-missing-files.cpp b/clang/test/Modules/explicit-build-missing-files.cpp index ebe08fb40eb..e36b5051e83 100644 --- a/clang/test/Modules/explicit-build-missing-files.cpp +++ b/clang/test/Modules/explicit-build-missing-files.cpp @@ -3,7 +3,7 @@ // RUN: echo 'extern int a; template<typename T> int a2 = T::error;' > %t/a.h // RUN: echo 'extern int b;' > %t/b.h // RUN: echo 'extern int c = 0;' > %t/c.h -// RUN: echo 'module a { header "a.h" header "b.h" header "c.h" }' > %t/modulemap +// RUN: echo 'module a { module aa { header "a.h" header "b.h" header "c.h" } }' > %t/modulemap // RUN: echo 'module other {}' > %t/other.modulemap // We lazily check that the files referenced by an explicitly-specified .pcm |