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:
@@ -387,8 +387,11 @@ static bool getModuleInterfaceInfo(
|
||||
Options.SkipInlineCXXNamespace = true;
|
||||
}
|
||||
}
|
||||
// Skip submodules but include any exported modules that have the same public
|
||||
// module name as this module.
|
||||
ModuleTraversalOptions TraversalOptions =
|
||||
std::nullopt; // Don't print submodules.
|
||||
ModuleTraversal::VisitMatchingExported;
|
||||
|
||||
SmallString<128> Text;
|
||||
llvm::raw_svector_ostream OS(Text);
|
||||
AnnotatingPrinter Printer(Info, OS);
|
||||
|
||||
Reference in New Issue
Block a user