aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-11-15 19:47:16 +0000
committerDouglas Gregor <dgregor@apple.com>2012-11-15 19:47:16 +0000
commit71f49f5d8fc3c4980bed4bb7790c8d0e50586d3b (patch)
treea4bdffcf7c486fbce4642477f5f960368710a7fb
parent63bc186d6ac0b44ba4ec6fccb5f471b05c79b666 (diff)
If an excluded header does not exist, just ignore it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168077 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Lex/ModuleMap.cpp4
-rw-r--r--test/Modules/Inputs/module.map1
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp
index 8a936fa8e1..dda96c5989 100644
--- a/lib/Lex/ModuleMap.cpp
+++ b/lib/Lex/ModuleMap.cpp
@@ -1307,7 +1307,9 @@ void ModuleMapParser::parseHeaderDecl(SourceLocation UmbrellaLoc,
if (BuiltinFile)
Map.addHeader(ActiveModule, BuiltinFile, Exclude);
}
- } else {
+ } else if (!Exclude) {
+ // Ignore excluded header files. They're optional anyway.
+
Diags.Report(FileNameLoc, diag::err_mmap_header_not_found)
<< Umbrella << FileName;
HadError = true;
diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map
index 032241d6aa..46e7af8422 100644
--- a/test/Modules/Inputs/module.map
+++ b/test/Modules/Inputs/module.map
@@ -63,6 +63,7 @@ module decldef {
module redecl_merge_top {
header "redecl-merge-top.h"
explicit module Explicit { header "redecl-merge-top-explicit.h" }
+ exclude header "nonexistent.h"
}
module redecl_merge_left {
header "redecl-merge-left.h"