Module aliasing: modify ImportPath getters to return real module names

Resolves rdar://83632921, rdar://83633109
This commit is contained in:
Ellie Shin
2021-11-03 17:42:16 -07:00
parent a24d74bbef
commit c08e7b9cd2
7 changed files with 231 additions and 10 deletions

View File

@@ -65,8 +65,7 @@ bool swift::emitImportedModules(ModuleDecl *mainModule,
auto ID = dyn_cast<ImportDecl>(D);
if (!ID)
continue;
auto modulePath = ID->getModulePath();
auto modulePath = ID->getModulePath(/*withRealModuleName=*/true);
// only the top-level name is needed (i.e. A in A.B.C)
Modules.insert(modulePath[0].Item.str());
}