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
diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp
index 8a936fa..dda96c5 100644
--- a/lib/Lex/ModuleMap.cpp
+++ b/lib/Lex/ModuleMap.cpp
@@ -1307,7 +1307,9 @@
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 032241d..46e7af8 100644
--- a/test/Modules/Inputs/module.map
+++ b/test/Modules/Inputs/module.map
@@ -63,6 +63,7 @@
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"