Skip to content

Commit fb86a72

Browse files
committed
AST: Remove default argument from ModuleDecl::getImportedModules().
1 parent cd6864a commit fb86a72

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

include/swift/AST/Module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ class ModuleDecl
983983
/// \p filter controls whether public, private, or any imports are included
984984
/// in this list.
985985
void getImportedModules(SmallVectorImpl<ImportedModule> &imports,
986-
ImportFilter filter = ImportFilterKind::Exported) const;
986+
ImportFilter filter) const;
987987

988988
/// Looks up which external macros are defined by this file.
989989
void getExternalMacros(SmallVectorImpl<ExternalMacroPlugin> &macros) const;

lib/IDE/ImportDepth.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ImportDepth::ImportDepth(ASTContext &context,
6464

6565
// Add imports to the worklist.
6666
SmallVector<ImportedModule, 16> imports;
67-
module->getImportedModules(imports);
67+
module->getImportedModules(imports, ModuleDecl::ImportFilterKind::Exported);
6868
for (auto &import : imports) {
6969
uint8_t next = std::max(depth, uint8_t(depth + 1)); // unsigned wrap
7070

lib/Index/Index.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,12 +2091,8 @@ void IndexSwiftASTWalker::collectRecursiveModuleImports(
20912091
return;
20922092
}
20932093

2094-
ModuleDecl::ImportFilter ImportFilter;
2095-
ImportFilter |= ModuleDecl::ImportFilterKind::Exported;
2096-
ImportFilter |= ModuleDecl::ImportFilterKind::Default;
2097-
// FIXME: ImportFilterKind::ShadowedByCrossImportOverlay?
20982094
SmallVector<ImportedModule, 8> Imports;
2099-
TopMod.getImportedModules(Imports);
2095+
TopMod.getImportedModules(Imports, ModuleDecl::ImportFilterKind::Exported);
21002096

21012097
for (auto Import : Imports) {
21022098
collectRecursiveModuleImports(*Import.importedModule, Visited);

0 commit comments

Comments
 (0)