mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user