[Sema] Remove ImportFilterKind::SPIAccessControl

That filter wasn't needed in practice, we can remove it.
This commit is contained in:
Alexis Laferrière
2023-02-24 17:17:51 -08:00
parent aced44a84b
commit 4330921806
10 changed files with 11 additions and 30 deletions

View File

@@ -1214,8 +1214,7 @@ void Serializer::writeInputBlock(const SerializationOptions &options) {
M->getImportedModules(allImports,
{ModuleDecl::ImportFilterKind::Exported,
ModuleDecl::ImportFilterKind::Default,
ModuleDecl::ImportFilterKind::ImplementationOnly,
ModuleDecl::ImportFilterKind::SPIAccessControl});
ModuleDecl::ImportFilterKind::ImplementationOnly});
ImportedModule::removeDuplicates(allImports);
// Collect the public and private imports as a subset so that we can
@@ -1224,8 +1223,6 @@ void Serializer::writeInputBlock(const SerializationOptions &options) {
getImportsAsSet(M, ModuleDecl::ImportFilterKind::Exported);
ImportSet privateImportSet =
getImportsAsSet(M, ModuleDecl::ImportFilterKind::Default);
ImportSet spiImportSet =
getImportsAsSet(M, ModuleDecl::ImportFilterKind::SPIAccessControl);
auto clangImporter =
static_cast<ClangImporter *>(M->getASTContext().getClangModuleLoader());
@@ -1271,7 +1268,7 @@ void Serializer::writeInputBlock(const SerializationOptions &options) {
// form here.
if (publicImportSet.count(import))
stableImportControl = ImportControl::Exported;
else if (privateImportSet.count(import) || spiImportSet.count(import))
else if (privateImportSet.count(import))
stableImportControl = ImportControl::Normal;
else
stableImportControl = ImportControl::ImplementationOnly;