summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-04-21 19:49:57 +0000
committerBen Langmuir <blangmuir@apple.com>2014-04-21 19:49:57 +0000
commit4898cde4e100d65de375ee0bbf19c66061fa4f25 (patch)
treeaa731d2a5592021df152e969eeaf11a214f1abd1 /clang/lib/Lex/ModuleMap.cpp
parent6d23a7b600bfdf53b48f5742058723276a70a4ef (diff)
downloadbcm5719-llvm-4898cde4e100d65de375ee0bbf19c66061fa4f25.tar.gz
bcm5719-llvm-4898cde4e100d65de375ee0bbf19c66061fa4f25.zip
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. llvm-svn: 206776
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 0e712b0dce6..068e16d0431 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -1988,7 +1988,8 @@ void ModuleMapParser::parseInferredModuleDecl(bool Framework, bool Explicit) {
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;
}
OpenPOWER on IntegriCloud