mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge exported modules with the same public name in generated interface
If a module has the same `public-module-name` as the module being generated and its import is exported, merge it into the same generated interface. Fix various always-imported modules from being printed while here and update all the tests that checked for them. Resolves rdar://137887712.
This commit is contained in:
@@ -764,7 +764,8 @@ static StringRef getModuleName(const ValueDecl *VD,
|
||||
// overlay's declaring module as the owning module.
|
||||
if (ModuleDecl *Declaring = MD->getDeclaringModuleIfCrossImportOverlay())
|
||||
MD = Declaring;
|
||||
return MD->getNameStr();
|
||||
|
||||
return MD->getPublicModuleName(/*onlyIfImported=*/false).str();
|
||||
}
|
||||
|
||||
struct DeclInfo {
|
||||
|
||||
Reference in New Issue
Block a user