diff --git a/include/swift/Basic/BlockListAction.def b/include/swift/Basic/BlockListAction.def index 11d73387df262..a42886b40af46 100644 --- a/include/swift/Basic/BlockListAction.def +++ b/include/swift/Basic/BlockListAction.def @@ -24,5 +24,6 @@ BLOCKLIST_ACTION(ShouldUseTextualModule) BLOCKLIST_ACTION(DowngradeInterfaceVerificationFailure) BLOCKLIST_ACTION(ShouldUseLayoutStringValueWitnesses) BLOCKLIST_ACTION(SkipEmittingFineModuleTrace) +BLOCKLIST_ACTION(SkipIndexingModule) #undef BLOCKLIST_ACTION diff --git a/lib/Index/Index.cpp b/lib/Index/Index.cpp index 104c59c926e38..29a3fd45b8c12 100644 --- a/lib/Index/Index.cpp +++ b/lib/Index/Index.cpp @@ -2155,6 +2155,12 @@ void index::indexSourceFile(SourceFile *SF, IndexDataConsumer &consumer) { void index::indexModule(ModuleDecl *module, IndexDataConsumer &consumer) { assert(module); + auto mName = module->getRealName().str(); + if (module->getASTContext().blockListConfig.hasBlockListAction(mName, + BlockListKeyKind::ModuleName, + BlockListAction::SkipIndexingModule)) { + return; + } IndexSwiftASTWalker walker(consumer, module->getASTContext()); walker.visitModule(*module); consumer.finish();