[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

@@ -2010,14 +2010,14 @@ ModuleDecl *ModuleFile::getModule(ArrayRef<Identifier> name,
// FIXME: duplicated from NameBinder::getModule
if (name.size() == 1 &&
name.front() == FileContext->getParentModule()->getName()) {
if (!ShadowedModule && allowLoading) {
if (!UnderlyingModule && allowLoading) {
auto importer = getContext().getClangModuleLoader();
assert(importer && "no way to import shadowed module");
ShadowedModule = importer->loadModule(SourceLoc(),
{ { name.front(), SourceLoc() } });
UnderlyingModule = importer->loadModule(SourceLoc(),
{{name.front(), SourceLoc()}});
}
return ShadowedModule;
return UnderlyingModule;
}
SmallVector<ImportDecl::AccessPathElement, 4> importPath;