Skip to content

Commit d3369f7

Browse files
[NFC] Rename ImportFilterKind cases to be clearer.
1 parent d669247 commit d3369f7

22 files changed

+70
-71
lines changed

include/swift/AST/FileUnit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class FileUnit : public DeclContext {
241241
/// \see ModuleDecl::getImportedModulesForLookup
242242
virtual void getImportedModulesForLookup(
243243
SmallVectorImpl<ModuleDecl::ImportedModule> &imports) const {
244-
return getImportedModules(imports, ModuleDecl::ImportFilterKind::Public);
244+
return getImportedModules(imports, ModuleDecl::ImportFilterKind::Exported);
245245
}
246246

247247
/// Generates the list of libraries needed to link this file, based on its

include/swift/AST/Module.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -648,17 +648,16 @@ class ModuleDecl : public DeclContext, public TypeDecl {
648648
/// \sa getImportedModules
649649
enum class ImportFilterKind {
650650
/// Include imports declared with `@_exported`.
651-
Public = 1 << 0,
651+
Exported = 1 << 0,
652652
/// Include "regular" imports with no special annotation.
653-
Private = 1 << 1,
653+
Default = 1 << 1,
654654
/// Include imports declared with `@_implementationOnly`.
655655
ImplementationOnly = 1 << 2,
656656
/// Include imports of SPIs declared with `@_spi`
657657
SPIAccessControl = 1 << 3,
658-
/// Include imports shadowed by a separately-imported overlay (i.e. a
659-
/// cross-import overlay). Unshadowed imports are included whether or not
660-
/// this flag is specified.
661-
ShadowedBySeparateOverlay = 1 << 4
658+
/// Include imports shadowed by a cross-import overlay. Unshadowed imports
659+
/// are included whether or not this flag is specified.
660+
ShadowedByCrossImportOverlay = 1 << 4
662661
};
663662
/// \sa getImportedModules
664663
using ImportFilter = OptionSet<ImportFilterKind>;
@@ -668,7 +667,7 @@ class ModuleDecl : public DeclContext, public TypeDecl {
668667
/// \p filter controls whether public, private, or any imports are included
669668
/// in this list.
670669
void getImportedModules(SmallVectorImpl<ImportedModule> &imports,
671-
ImportFilter filter = ImportFilterKind::Public) const;
670+
ImportFilter filter = ImportFilterKind::Exported) const;
672671

673672
/// Looks up which modules are imported by this module, ignoring any that
674673
/// won't contain top-level decls.

lib/AST/ImportCache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ ImportSet &ImportCache::getImportSet(const DeclContext *dc) {
176176

177177
if (file) {
178178
file->getImportedModules(imports,
179-
{ModuleDecl::ImportFilterKind::Private,
179+
{ModuleDecl::ImportFilterKind::Default,
180180
ModuleDecl::ImportFilterKind::ImplementationOnly,
181181
ModuleDecl::ImportFilterKind::SPIAccessControl});
182182
}
@@ -261,7 +261,7 @@ ImportCache::getAllAccessPathsNotShadowedBy(const ModuleDecl *mod,
261261

262262
if (auto *file = dyn_cast<FileUnit>(dc)) {
263263
file->getImportedModules(stack,
264-
{ModuleDecl::ImportFilterKind::Private,
264+
{ModuleDecl::ImportFilterKind::Default,
265265
ModuleDecl::ImportFilterKind::ImplementationOnly,
266266
ModuleDecl::ImportFilterKind::SPIAccessControl});
267267
}

lib/AST/Module.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,16 +1184,16 @@ SourceFile::getImportedModules(SmallVectorImpl<ModuleDecl::ImportedModule> &modu
11841184
for (auto desc : *Imports) {
11851185
ModuleDecl::ImportFilter requiredFilter;
11861186
if (desc.importOptions.contains(ImportFlags::Exported))
1187-
requiredFilter |= ModuleDecl::ImportFilterKind::Public;
1187+
requiredFilter |= ModuleDecl::ImportFilterKind::Exported;
11881188
else if (desc.importOptions.contains(ImportFlags::ImplementationOnly))
11891189
requiredFilter |= ModuleDecl::ImportFilterKind::ImplementationOnly;
11901190
else if (desc.importOptions.contains(ImportFlags::SPIAccessControl))
11911191
requiredFilter |= ModuleDecl::ImportFilterKind::SPIAccessControl;
11921192
else
1193-
requiredFilter |= ModuleDecl::ImportFilterKind::Private;
1193+
requiredFilter |= ModuleDecl::ImportFilterKind::Default;
11941194

11951195
if (!separatelyImportedOverlays.lookup(desc.module.importedModule).empty())
1196-
requiredFilter |= ModuleDecl::ImportFilterKind::ShadowedBySeparateOverlay;
1196+
requiredFilter |= ModuleDecl::ImportFilterKind::ShadowedByCrossImportOverlay;
11971197

11981198
if (filter.contains(requiredFilter))
11991199
modules.push_back(desc.module);
@@ -1445,8 +1445,8 @@ SourceFile::collectLinkLibraries(ModuleDecl::LinkLibraryCallback callback) const
14451445
SmallVector<ModuleDecl::ImportedModule, 32> stack;
14461446

14471447
ModuleDecl::ImportFilter filter = {
1448-
ModuleDecl::ImportFilterKind::Public,
1449-
ModuleDecl::ImportFilterKind::Private,
1448+
ModuleDecl::ImportFilterKind::Exported,
1449+
ModuleDecl::ImportFilterKind::Default,
14501450
ModuleDecl::ImportFilterKind::SPIAccessControl};
14511451

14521452
auto *topLevel = getParentModule();
@@ -1680,7 +1680,7 @@ ModuleDecl::getDeclaringModuleAndBystander() {
16801680
SmallVector<ModuleDecl::ImportedModule, 16> furtherImported;
16811681
ModuleDecl *overlayModule = this;
16821682

1683-
getImportedModules(imported, ModuleDecl::ImportFilterKind::Public);
1683+
getImportedModules(imported, ModuleDecl::ImportFilterKind::Exported);
16841684
while (!imported.empty()) {
16851685
ModuleDecl *importedModule = imported.back().importedModule;
16861686
imported.pop_back();
@@ -1706,7 +1706,7 @@ ModuleDecl::getDeclaringModuleAndBystander() {
17061706

17071707
furtherImported.clear();
17081708
importedModule->getImportedModules(furtherImported,
1709-
ModuleDecl::ImportFilterKind::Public);
1709+
ModuleDecl::ImportFilterKind::Exported);
17101710
imported.append(furtherImported.begin(), furtherImported.end());
17111711
}
17121712

@@ -1988,10 +1988,10 @@ bool ModuleDecl::isImportedImplementationOnly(const ModuleDecl *module) const {
19881988
// Look through non-implementation-only imports to see if module is imported
19891989
// in some other way. Otherwise we assume it's implementation-only imported.
19901990
ModuleDecl::ImportFilter filter = {
1991-
ModuleDecl::ImportFilterKind::Public,
1992-
ModuleDecl::ImportFilterKind::Private,
1991+
ModuleDecl::ImportFilterKind::Exported,
1992+
ModuleDecl::ImportFilterKind::Default,
19931993
ModuleDecl::ImportFilterKind::SPIAccessControl,
1994-
ModuleDecl::ImportFilterKind::ShadowedBySeparateOverlay};
1994+
ModuleDecl::ImportFilterKind::ShadowedByCrossImportOverlay};
19951995
SmallVector<ModuleDecl::ImportedModule, 4> results;
19961996
getImportedModules(results, filter);
19971997

lib/ClangImporter/ClangImporter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,26 +3443,26 @@ void ClangModuleUnit::getImportedModules(
34433443

34443444
// [NOTE: Pure-Clang-modules-privately-import-stdlib]:
34453445
// Needed for implicitly synthesized conformances.
3446-
if (filter.contains(ModuleDecl::ImportFilterKind::Private))
3446+
if (filter.contains(ModuleDecl::ImportFilterKind::Default))
34473447
if (auto stdlib = owner.getStdlibModule())
34483448
imports.push_back({ImportPath::Access(), stdlib});
34493449

34503450
SmallVector<clang::Module *, 8> imported;
34513451
if (!clangModule) {
34523452
// This is the special "imported headers" module.
3453-
if (filter.contains(ModuleDecl::ImportFilterKind::Public)) {
3453+
if (filter.contains(ModuleDecl::ImportFilterKind::Exported)) {
34543454
imported.append(owner.ImportedHeaderExports.begin(),
34553455
owner.ImportedHeaderExports.end());
34563456
}
34573457

34583458
} else {
34593459
clangModule->getExportedModules(imported);
34603460

3461-
if (filter.contains(ModuleDecl::ImportFilterKind::Private)) {
3461+
if (filter.contains(ModuleDecl::ImportFilterKind::Default)) {
34623462
// Copy in any modules that are imported but not exported.
34633463
llvm::SmallPtrSet<clang::Module *, 8> knownModules(imported.begin(),
34643464
imported.end());
3465-
if (!filter.contains(ModuleDecl::ImportFilterKind::Public)) {
3465+
if (!filter.contains(ModuleDecl::ImportFilterKind::Exported)) {
34663466
// Remove the exported ones now that we're done with them.
34673467
imported.clear();
34683468
}

lib/Frontend/ModuleInterfaceSupport.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ static void printImports(raw_ostream &out,
101101
// FIXME: This is very similar to what's in Serializer::writeInputBlock, but
102102
// it's not obvious what higher-level optimization would be factored out here.
103103
ModuleDecl::ImportFilter allImportFilter = {
104-
ModuleDecl::ImportFilterKind::Public,
105-
ModuleDecl::ImportFilterKind::Private,
104+
ModuleDecl::ImportFilterKind::Exported,
105+
ModuleDecl::ImportFilterKind::Default,
106106
ModuleDecl::ImportFilterKind::SPIAccessControl};
107107

108108
// With -experimental-spi-imports:
@@ -128,7 +128,7 @@ static void printImports(raw_ostream &out,
128128
// Collect the public imports as a subset so that we can mark them with
129129
// '@_exported'.
130130
SmallVector<ModuleDecl::ImportedModule, 8> publicImports;
131-
M->getImportedModules(publicImports, ModuleDecl::ImportFilterKind::Public);
131+
M->getImportedModules(publicImports, ModuleDecl::ImportFilterKind::Exported);
132132
llvm::SmallSet<ModuleDecl::ImportedModule, 8,
133133
ModuleDecl::OrderImportedModules> publicImportSet;
134134

lib/FrontendTool/FrontendTool.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ static void getImmediateImports(
305305
ModuleDecl *module,
306306
SmallPtrSetImpl<ModuleDecl *> &imports,
307307
ModuleDecl::ImportFilter importFilter = {
308-
ModuleDecl::ImportFilterKind::Public,
309-
ModuleDecl::ImportFilterKind::Private,
308+
ModuleDecl::ImportFilterKind::Exported,
309+
ModuleDecl::ImportFilterKind::Default,
310310
ModuleDecl::ImportFilterKind::ImplementationOnly,
311311
ModuleDecl::ImportFilterKind::SPIAccessControl,
312-
ModuleDecl::ImportFilterKind::ShadowedBySeparateOverlay
312+
ModuleDecl::ImportFilterKind::ShadowedByCrossImportOverlay
313313
}) {
314314
SmallVector<ModuleDecl::ImportedModule, 8> importList;
315315
module->getImportedModules(importList, importFilter);
@@ -507,7 +507,7 @@ bool ABIDependencyEvaluator::isOverlayOfClangModule(ModuleDecl *swiftModule) {
507507

508508
llvm::SmallPtrSet<ModuleDecl *, 8> importList;
509509
::getImmediateImports(swiftModule, importList,
510-
{ModuleDecl::ImportFilterKind::Public});
510+
{ModuleDecl::ImportFilterKind::Exported});
511511
bool isOverlay =
512512
llvm::any_of(importList, [&](ModuleDecl *importedModule) -> bool {
513513
return isClangOverlayOf(swiftModule, importedModule);
@@ -642,7 +642,7 @@ void ABIDependencyEvaluator::computeABIDependenciesForSwiftModule(
642642

643643
SmallPtrSet<ModuleDecl *, 32> reexportedImports;
644644
::getImmediateImports(module, reexportedImports,
645-
{ModuleDecl::ImportFilterKind::Public});
645+
{ModuleDecl::ImportFilterKind::Exported});
646646
for (auto reexportedImport: reexportedImports) {
647647
reexposeImportedABI(module, reexportedImport);
648648
}

lib/FrontendTool/ImportedModules.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ bool swift::emitImportedModules(ModuleDecl *mainModule,
8080
if (!clangImporter->importBridgingHeader(implicitHeaderPath, mainModule)) {
8181
SmallVector<ModuleDecl::ImportedModule, 16> imported;
8282
clangImporter->getImportedHeaderModule()->getImportedModules(
83-
imported, {ModuleDecl::ImportFilterKind::Public,
84-
ModuleDecl::ImportFilterKind::Private,
83+
imported, {ModuleDecl::ImportFilterKind::Exported,
84+
ModuleDecl::ImportFilterKind::Default,
8585
ModuleDecl::ImportFilterKind::ImplementationOnly,
8686
ModuleDecl::ImportFilterKind::SPIAccessControl});
8787

lib/IDE/CodeCompletion.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,8 +2040,8 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
20402040
SmallVector<ModuleDecl::ImportedModule, 16> FurtherImported;
20412041
CurrDeclContext->getParentSourceFile()->getImportedModules(
20422042
Imported,
2043-
{ModuleDecl::ImportFilterKind::Public,
2044-
ModuleDecl::ImportFilterKind::Private,
2043+
{ModuleDecl::ImportFilterKind::Exported,
2044+
ModuleDecl::ImportFilterKind::Default,
20452045
ModuleDecl::ImportFilterKind::ImplementationOnly});
20462046
while (!Imported.empty()) {
20472047
ModuleDecl *MD = Imported.back().importedModule;
@@ -2050,7 +2050,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
20502050
continue;
20512051
FurtherImported.clear();
20522052
MD->getImportedModules(FurtherImported,
2053-
ModuleDecl::ImportFilterKind::Public);
2053+
ModuleDecl::ImportFilterKind::Exported);
20542054
Imported.append(FurtherImported.begin(), FurtherImported.end());
20552055
}
20562056
}
@@ -5993,8 +5993,8 @@ static void deliverCompletionResults(CodeCompletionContext &CompletionContext,
59935993
// Add results for all imported modules.
59945994
SmallVector<ModuleDecl::ImportedModule, 4> Imports;
59955995
SF.getImportedModules(
5996-
Imports, {ModuleDecl::ImportFilterKind::Public,
5997-
ModuleDecl::ImportFilterKind::Private,
5996+
Imports, {ModuleDecl::ImportFilterKind::Exported,
5997+
ModuleDecl::ImportFilterKind::Default,
59985998
ModuleDecl::ImportFilterKind::ImplementationOnly});
59995999

60006000
for (auto Imported : Imports) {

lib/IDE/REPLCodeCompletion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ doCodeCompletion(SourceFile &SF, StringRef EnteredCode, unsigned *BufferID,
227227
// Carry over the private imports from the last module.
228228
SmallVector<ModuleDecl::ImportedModule, 8> imports;
229229
lastModule->getImportedModules(imports,
230-
ModuleDecl::ImportFilterKind::Private);
230+
ModuleDecl::ImportFilterKind::Default);
231231
for (auto &import : imports) {
232232
implicitImports.AdditionalModules.emplace_back(import.importedModule,
233233
/*exported*/ false);

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,8 +1843,8 @@ void IRGenDebugInfoImpl::finalize() {
18431843
// from all ImportDecls).
18441844
SmallVector<ModuleDecl::ImportedModule, 8> ModuleWideImports;
18451845
IGM.getSwiftModule()->getImportedModules(
1846-
ModuleWideImports, {ModuleDecl::ImportFilterKind::Public,
1847-
ModuleDecl::ImportFilterKind::Private,
1846+
ModuleWideImports, {ModuleDecl::ImportFilterKind::Exported,
1847+
ModuleDecl::ImportFilterKind::Default,
18481848
ModuleDecl::ImportFilterKind::ImplementationOnly});
18491849
for (auto M : ModuleWideImports)
18501850
if (!ImportedModules.count(M.importedModule))

lib/Index/Index.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ class SourceFileOrModule {
126126
void
127127
getImportedModules(SmallVectorImpl<ModuleDecl::ImportedModule> &Modules) const {
128128
constexpr ModuleDecl::ImportFilter ImportFilter = {
129-
ModuleDecl::ImportFilterKind::Public,
130-
ModuleDecl::ImportFilterKind::Private,
129+
ModuleDecl::ImportFilterKind::Exported,
130+
ModuleDecl::ImportFilterKind::Default,
131131
ModuleDecl::ImportFilterKind::ImplementationOnly};
132132

133133
if (auto *SF = SFOrMod.dyn_cast<SourceFile *>()) {
@@ -1599,9 +1599,9 @@ void IndexSwiftASTWalker::collectRecursiveModuleImports(
15991599
}
16001600

16011601
ModuleDecl::ImportFilter ImportFilter;
1602-
ImportFilter |= ModuleDecl::ImportFilterKind::Public;
1603-
ImportFilter |= ModuleDecl::ImportFilterKind::Private;
1604-
// FIXME: ImportFilterKind::ShadowedBySeparateOverlay?
1602+
ImportFilter |= ModuleDecl::ImportFilterKind::Exported;
1603+
ImportFilter |= ModuleDecl::ImportFilterKind::Default;
1604+
// FIXME: ImportFilterKind::ShadowedByCrossImportOverlay?
16051605
SmallVector<ModuleDecl::ImportedModule, 8> Imports;
16061606
TopMod.getImportedModules(Imports);
16071607

lib/Index/IndexRecord.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ emitDataForSwiftSerializedModule(ModuleDecl *module,
581581
}
582582

583583
SmallVector<ModuleDecl::ImportedModule, 8> imports;
584-
module->getImportedModules(imports, {ModuleDecl::ImportFilterKind::Public,
585-
ModuleDecl::ImportFilterKind::Private});
584+
module->getImportedModules(imports, {ModuleDecl::ImportFilterKind::Exported,
585+
ModuleDecl::ImportFilterKind::Default});
586586
StringScratchSpace moduleNameScratch;
587587
addModuleDependencies(imports, indexStorePath, indexSystemModules, skipStdlib,
588588
targetTriple, clangCI, diags, unitWriter,
@@ -621,8 +621,8 @@ recordSourceFileUnit(SourceFile *primarySourceFile, StringRef indexUnitToken,
621621
// Module dependencies.
622622
SmallVector<ModuleDecl::ImportedModule, 8> imports;
623623
primarySourceFile->getImportedModules(
624-
imports, {ModuleDecl::ImportFilterKind::Public,
625-
ModuleDecl::ImportFilterKind::Private,
624+
imports, {ModuleDecl::ImportFilterKind::Exported,
625+
ModuleDecl::ImportFilterKind::Default,
626626
ModuleDecl::ImportFilterKind::ImplementationOnly});
627627
StringScratchSpace moduleNameScratch;
628628
addModuleDependencies(imports, indexStorePath, indexSystemModules, skipStdlib,

lib/Sema/ImportResolution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ void ImportResolver::addCrossImportableModules(ImportedModuleDesc importDesc) {
11731173

11741174
// Add the module's re-exports to worklist.
11751175
nextImport.importedModule->getImportedModules(
1176-
importsWorklist, ModuleDecl::ImportFilterKind::Public);
1176+
importsWorklist, ModuleDecl::ImportFilterKind::Exported);
11771177
}
11781178
}
11791179

lib/Serialization/ModuleFile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ void ModuleFile::getImportedModules(
427427

428428
for (auto &dep : Dependencies) {
429429
if (dep.isExported()) {
430-
if (!filter.contains(ModuleDecl::ImportFilterKind::Public))
430+
if (!filter.contains(ModuleDecl::ImportFilterKind::Exported))
431431
continue;
432432

433433
} else if (dep.isImplementationOnly()) {
@@ -440,7 +440,7 @@ void ModuleFile::getImportedModules(
440440
}
441441

442442
} else {
443-
if (!filter.contains(ModuleDecl::ImportFilterKind::Private))
443+
if (!filter.contains(ModuleDecl::ImportFilterKind::Default))
444444
continue;
445445
}
446446

lib/Serialization/ModuleFileSharedCore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,9 +824,9 @@ getActualImportControl(unsigned rawValue) {
824824
// values.
825825
switch (rawValue) {
826826
case static_cast<unsigned>(serialization::ImportControl::Normal):
827-
return ModuleDecl::ImportFilterKind::Private;
827+
return ModuleDecl::ImportFilterKind::Default;
828828
case static_cast<unsigned>(serialization::ImportControl::Exported):
829-
return ModuleDecl::ImportFilterKind::Public;
829+
return ModuleDecl::ImportFilterKind::Exported;
830830
case static_cast<unsigned>(serialization::ImportControl::ImplementationOnly):
831831
return ModuleDecl::ImportFilterKind::ImplementationOnly;
832832
default:

lib/Serialization/ModuleFileSharedCore.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ class ModuleFileSharedCore {
112112

113113
static Dependency forHeader(StringRef headerPath, bool exported) {
114114
auto importControl =
115-
exported ? ImportFilterKind::Public : ImportFilterKind::Private;
115+
exported ? ImportFilterKind::Exported : ImportFilterKind::Default;
116116
return Dependency(headerPath, StringRef(), true, importControl, false);
117117
}
118118

119119
bool isExported() const {
120-
return getImportControl() == ImportFilterKind::Public;
120+
return getImportControl() == ImportFilterKind::Exported;
121121
}
122122
bool isImplementationOnly() const {
123123
return getImportControl() == ImportFilterKind::ImplementationOnly;

lib/Serialization/Serialization.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,18 +1026,18 @@ void Serializer::writeInputBlock(const SerializationOptions &options) {
10261026

10271027
SmallVector<ModuleDecl::ImportedModule, 8> allImports;
10281028
M->getImportedModules(allImports,
1029-
{ModuleDecl::ImportFilterKind::Public,
1030-
ModuleDecl::ImportFilterKind::Private,
1029+
{ModuleDecl::ImportFilterKind::Exported,
1030+
ModuleDecl::ImportFilterKind::Default,
10311031
ModuleDecl::ImportFilterKind::ImplementationOnly,
10321032
ModuleDecl::ImportFilterKind::SPIAccessControl});
10331033
ModuleDecl::removeDuplicateImports(allImports);
10341034

10351035
// Collect the public and private imports as a subset so that we can
10361036
// distinguish them.
10371037
ImportSet publicImportSet =
1038-
getImportsAsSet(M, ModuleDecl::ImportFilterKind::Public);
1038+
getImportsAsSet(M, ModuleDecl::ImportFilterKind::Exported);
10391039
ImportSet privateImportSet =
1040-
getImportsAsSet(M, ModuleDecl::ImportFilterKind::Private);
1040+
getImportsAsSet(M, ModuleDecl::ImportFilterKind::Default);
10411041
ImportSet spiImportSet =
10421042
getImportsAsSet(M, ModuleDecl::ImportFilterKind::SPIAccessControl);
10431043

0 commit comments

Comments
 (0)