r206776 - Allow submodule inferrences with a missing umbrella when the module is unavailable
Ben Langmuir
blangmuir at apple.com
Mon Apr 21 12:49:57 PDT 2014
Author: benlangmuir
Date: Mon Apr 21 14:49:57 2014
New Revision: 206776
URL: http://llvm.org/viewvc/llvm-project?rev=206776&view=rev
Log:
Allow submodule inferrences with a missing umbrella when the module is unavailable
If the module is unavailable because of a missing header, don't diagnose
a "module * {}" declaration for having a missing umbrella.
Modified:
cfe/trunk/lib/Lex/ModuleMap.cpp
cfe/trunk/test/Modules/Inputs/submodules/module.map
Modified: cfe/trunk/lib/Lex/ModuleMap.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/ModuleMap.cpp?rev=206776&r1=206775&r2=206776&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/ModuleMap.cpp (original)
+++ cfe/trunk/lib/Lex/ModuleMap.cpp Mon Apr 21 14:49:57 2014
@@ -1988,7 +1988,8 @@ void ModuleMapParser::parseInferredModul
if (ActiveModule) {
// Inferred modules must have umbrella directories.
- if (!Failed && !ActiveModule->getUmbrellaDir()) {
+ if (!Failed && ActiveModule->IsAvailable &&
+ !ActiveModule->getUmbrellaDir()) {
Diags.Report(StarLoc, diag::err_mmap_inferred_no_umbrella);
Failed = true;
}
Modified: cfe/trunk/test/Modules/Inputs/submodules/module.map
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/submodules/module.map?rev=206776&r1=206775&r2=206776&view=diff
==============================================================================
--- cfe/trunk/test/Modules/Inputs/submodules/module.map (original)
+++ cfe/trunk/test/Modules/Inputs/submodules/module.map Mon Apr 21 14:49:57 2014
@@ -24,3 +24,9 @@ module missing_unavailable_headers {
}
module not_missing { }
}
+
+module missing_umbrella_with_inferred_submodules {
+ umbrella header "missing_umbrella.h"
+ module * { export * }
+ export *
+}
More information about the cfe-commits
mailing list