diff options
author | Richard Smith <richard@metafoo.co.uk> | 2020-04-17 16:23:41 -0700 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2020-04-17 22:48:56 -0700 |
commit | fc76b4ad3da3c1f5fdc34370a55d613b3ca7af73 (patch) | |
tree | 1341b19511318fd1b81294c5686570ae624dc32b /clang/lib/Lex/ModuleMap.cpp | |
parent | c8248dc3bb36bea61ac6d87bd02c39c6a781b011 (diff) | |
download | llvm-fc76b4ad3da3c1f5fdc34370a55d613b3ca7af73.zip llvm-fc76b4ad3da3c1f5fdc34370a55d613b3ca7af73.tar.gz llvm-fc76b4ad3da3c1f5fdc34370a55d613b3ca7af73.tar.bz2 |
Rename IsMissingRequirement to IsUnimportable and set it for shadowed
modules too.
This more accurately reflects the semantics of this flag, as distinct
from "IsAvailable", which (in an explicit modules world) only describes
whether a module is buildable, not whether it's importable.
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r-- | clang/lib/Lex/ModuleMap.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index bff4e11..2c79bb2 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -282,7 +282,7 @@ void ModuleMap::resolveHeader(Module *Mod, // resolved. (Such a module still can't be built though, except from // preprocessed source.) if (!Header.Size && !Header.ModTime) - Mod->markUnavailable(); + Mod->markUnavailable(/*Unimportable=*/false); } } @@ -1094,7 +1094,7 @@ Module *ModuleMap::createShadowedModule(StringRef Name, bool IsFramework, new Module(Name, SourceLocation(), /*Parent=*/nullptr, IsFramework, /*IsExplicit=*/false, NumCreatedModules++); Result->ShadowingModule = ShadowingModule; - Result->IsAvailable = false; + Result->markUnavailable(/*Unimportable*/true); ModuleScopeIDs[Result] = CurrentModuleScopeID; ShadowModules.push_back(Result); @@ -2096,9 +2096,9 @@ void ModuleMapParser::parseModuleDecl() { // If the module meets all requirements but is still unavailable, mark the // whole tree as unavailable to prevent it from building. - if (!ActiveModule->IsAvailable && !ActiveModule->IsMissingRequirement && + if (!ActiveModule->IsAvailable && !ActiveModule->IsUnimportable && ActiveModule->Parent) { - ActiveModule->getTopLevelModule()->markUnavailable(); + ActiveModule->getTopLevelModule()->markUnavailable(/*Unimportable=*/false); ActiveModule->getTopLevelModule()->MissingHeaders.append( ActiveModule->MissingHeaders.begin(), ActiveModule->MissingHeaders.end()); } |