[ModuleInterface] Print missing imports in swiftinterface

Hack to fix swiftinterfaces in case of missing imports. We can get rid
of this logic when we don't leak the use of non-locally imported things
in API.
This commit is contained in:
Alexis Laferrière
2022-08-19 10:31:21 -07:00
parent 9e4a00d115
commit 9e3f5f9cea
10 changed files with 77 additions and 0 deletions

View File

@@ -219,6 +219,10 @@ static void printImports(raw_ostream &out,
SmallVector<ImportedModule, 8> allImports;
M->getImportedModules(allImports, allImportFilter);
if (Opts.PrintMissingImports)
M->getMissingImportedModules(allImports);
ImportedModule::removeDuplicates(allImports);
diagnoseScopedImports(M->getASTContext().Diags, allImports);