Author: rsmith Date: Tue Apr 12 15:20:33 2016 New Revision: 266116 URL: http://llvm.org/viewvc/llvm-project?rev=266116&view=rev Log: [modules] Extend r266113 to cope with submodules.
Modified: cfe/trunk/lib/Lex/PPDirectives.cpp cfe/trunk/test/Modules/explicit-build-missing-files.cpp Modified: cfe/trunk/lib/Lex/PPDirectives.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=266116&r1=266115&r2=266116&view=diff ============================================================================== --- cfe/trunk/lib/Lex/PPDirectives.cpp (original) +++ cfe/trunk/lib/Lex/PPDirectives.cpp Tue Apr 12 15:20:33 2016 @@ -1678,7 +1678,9 @@ void Preprocessor::HandleIncludeDirectiv // 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(); Modified: cfe/trunk/test/Modules/explicit-build-missing-files.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/explicit-build-missing-files.cpp?rev=266116&r1=266115&r2=266116&view=diff ============================================================================== --- cfe/trunk/test/Modules/explicit-build-missing-files.cpp (original) +++ cfe/trunk/test/Modules/explicit-build-missing-files.cpp Tue Apr 12 15:20:33 2016 @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits