summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp4
1 files changed, 3 insertions, 1 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();
OpenPOWER on IntegriCloud