mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Clarify semantics of getImportedModules.
The lack of clarity manifested as unexpected behavior when using getImportedModules to create the module import graph. The new behavior makes SPI-ness and Shadowing-ness behave similarly in terms of filtering. We also check if a filter is well-formed to avoid accidental empty import lists.
This commit is contained in:
@@ -116,7 +116,8 @@ static void printImports(raw_ostream &out,
|
||||
|
||||
SmallVector<ModuleDecl::ImportedModule, 4> ioiImport;
|
||||
M->getImportedModules(ioiImport,
|
||||
ModuleDecl::ImportFilterKind::ImplementationOnly);
|
||||
{ModuleDecl::ImportFilterKind::ImplementationOnly,
|
||||
ModuleDecl::ImportFilterKind::SPIAccessControl});
|
||||
ioiImportSet.insert(ioiImport.begin(), ioiImport.end());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user