[Serialization] Retire "shadowed module" in favor of "underlying" (#24711)

Similar to 517f5d6b6a, the "shadowed" terminology didn't end up
describing the most common use of the feature; there is pretty much no
intended case where a Swift module shadows a Clang module without also
re-exporting it. Switch to "underlying", which was already in use in a
few places, and which better parallels "overlay".

No intended functionality change.
This commit is contained in:
Jordan Rose
2019-05-13 10:20:03 -07:00
committed by GitHub
parent b903f7191d
commit 6cca050fd9
6 changed files with 22 additions and 22 deletions

View File

@@ -562,7 +562,7 @@ FileUnit *SerializedModuleLoaderBase::loadAST(
// necessarily mean it's "system" module. User can make their own overlay
// in non-system directory.
// Remove this block after we fix the test suite.
if (auto shadowed = loadedModuleFile->getShadowedModule())
if (auto shadowed = loadedModuleFile->getUnderlyingModule())
if (shadowed->isSystemModule())
M.setIsSystemModule(true);
@@ -704,8 +704,8 @@ void swift::serialization::diagnoseSerializedASTLoadFailure(
break;
}
case serialization::Status::MissingShadowedModule: {
Ctx.Diags.diagnose(diagLoc, diag::serialization_missing_shadowed_module,
case serialization::Status::MissingUnderlyingModule: {
Ctx.Diags.diagnose(diagLoc, diag::serialization_missing_underlying_module,
ModuleName);
if (Ctx.SearchPathOpts.SDKPath.empty() &&
llvm::Triple(llvm::sys::getProcessTriple()).isMacOSX()) {
@@ -938,7 +938,7 @@ void SerializedASTFile::collectLinkLibraries(
}
bool SerializedASTFile::isSystemModule() const {
if (auto Mod = File.getShadowedModule()) {
if (auto Mod = File.getUnderlyingModule()) {
return Mod->isSystemModule();
}
return false;
@@ -1065,8 +1065,8 @@ StringRef SerializedASTFile::getFilename() const {
}
const clang::Module *SerializedASTFile::getUnderlyingClangModule() const {
if (auto *ShadowedModule = File.getShadowedModule())
return ShadowedModule->findUnderlyingClangModule();
if (auto *UnderlyingModule = File.getUnderlyingModule())
return UnderlyingModule->findUnderlyingClangModule();
return nullptr;
}