Merge pull request #62044 from xymus/module-alias-disambiguate-fix

[ModuleInterface] Support loading an aliased module with an underlying module
This commit is contained in:
Alexis Laferrière
2022-11-11 11:55:44 -08:00
committed by GitHub
4 changed files with 20 additions and 3 deletions

View File

@@ -614,7 +614,8 @@ class ModuleInterfaceLoaderImpl {
StringRef inParentDirName =
path::filename(path::parent_path(interfacePath));
if (path::extension(inParentDirName) == ".swiftmodule") {
assert(path::stem(inParentDirName) == moduleName);
assert(path::stem(inParentDirName) ==
ctx.getRealModuleName(ctx.getIdentifier(moduleName)).str());
path::append(scratch, inParentDirName);
}
path::append(scratch, path::filename(modulePath));