diff options
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 85504de3d15..7fc008274bd 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1866,7 +1866,10 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, // unavailable, diagnose the situation and bail out. // FIXME: Remove this; loadModule does the same check (but produces // slightly worse diagnostics). - if (!SuggestedModule.getModule()->isAvailable()) { + if (!SuggestedModule.getModule()->isAvailable() && + !SuggestedModule.getModule() + ->getTopLevelModule() + ->HasIncompatibleModuleFile) { Module::Requirement Requirement; Module::UnresolvedHeaderDirective MissingHeader; Module *M = SuggestedModule.getModule(); @@ -1915,12 +1918,9 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, else if (Imported.isMissingExpected()) { // We failed to find a submodule that we assumed would exist (because it // was in the directory of an umbrella header, for instance), but no - // actual module containing it exists (because the umbrella header is + // actual module exists for it (because the umbrella header is // incomplete). Treat this as a textual inclusion. SuggestedModule = ModuleMap::KnownHeader(); - } else if (Imported.isConfigMismatch()) { - // On a configuration mismatch, enter the header textually. We still know - // that it's part of the corresponding module. } else { // We hit an error processing the import. Bail out. if (hadModuleLoaderFatalFailure()) { |