mirror of
https://github.com/intel/llvm.git
synced 2026-01-29 21:26:59 +08:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 *
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user