summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-04-12 20:20:33 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-04-12 20:20:33 +0000
commit6893570853ab02e78a3e6dd70e0e1bae064c4802 (patch)
treed96c343a7582a04fb9ff8a7740332065e6a319bd /clang/lib/Lex/PPDirectives.cpp
parent19f6cce4e34d94e3aab0f6f8de3122dee3b9a0ed (diff)
downloadbcm5719-llvm-6893570853ab02e78a3e6dd70e0e1bae064c4802.tar.gz
bcm5719-llvm-6893570853ab02e78a3e6dd70e0e1bae064c4802.zip
[modules] Extend r266113 to cope with submodules.
llvm-svn: 266116
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