mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ModuleInterface] Support missing imports with the AliasModuleNames workaround
If there's a reference in API to a module that's not imported, the import is inserted automatically in the swiftinterface. This ensures the inserted import is correctly aliased in AliasModuleNames mode.
This commit is contained in:
@@ -74,6 +74,7 @@ static void printToolVersionAndFlagsComment(raw_ostream &out,
|
||||
ModuleDecl::ImportFilterKind::Exported,
|
||||
ModuleDecl::ImportFilterKind::SPIOnly,
|
||||
ModuleDecl::ImportFilterKind::SPIAccessControl});
|
||||
M->getMissingImportedModules(imports);
|
||||
for (ImportedModule import: imports) {
|
||||
StringRef importedName = import.importedModule->getNameStr();
|
||||
if (aliasTargets.insert(importedName).second) {
|
||||
|
||||
Reference in New Issue
Block a user