mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Change ModuleDecl::getImportedModules to take an option set
...in preparation for me adding a third kind of import, making the existing "All" kind a problem. NFC, except that I did rewrite the ClangModuleUnit implementation of getImportedModules to be simpler!
This commit is contained in:
@@ -703,8 +703,12 @@ void SerializedASTFile::getImportedModules(
|
||||
|
||||
void SerializedASTFile::collectLinkLibrariesFromImports(
|
||||
ModuleDecl::LinkLibraryCallback callback) const {
|
||||
ModuleDecl::ImportFilter ImportFilter;
|
||||
ImportFilter |= ModuleDecl::ImportFilterKind::Public;
|
||||
ImportFilter |= ModuleDecl::ImportFilterKind::Private;
|
||||
|
||||
llvm::SmallVector<ModuleDecl::ImportedModule, 8> Imports;
|
||||
File.getImportedModules(Imports, ModuleDecl::ImportFilter::All);
|
||||
File.getImportedModules(Imports, ImportFilter);
|
||||
|
||||
for (auto Import : Imports)
|
||||
Import.second->collectLinkLibraries(callback);
|
||||
|
||||
Reference in New Issue
Block a user