ModuleLoader: emit a note when encountering a blocklisted module interface

This commit is contained in:
Xi Ge
2023-07-12 13:50:40 -07:00
parent 5ae73991d4
commit b697d40fb6
3 changed files with 15 additions and 4 deletions

View File

@@ -189,10 +189,14 @@ bool ExplicitModuleInterfaceBuilder::collectDepsForSerialization(
static bool shouldDowngradeInterfaceVerificationError(const FrontendOptions &opts,
ASTContext &ctx) {
return opts.DowngradeInterfaceVerificationError ||
ctx.blockListConfig.hasBlockListAction(opts.ModuleName,
BlockListKeyKind::ModuleName,
BlockListAction::DowngradeInterfaceVerificationFailure);
if (ctx.blockListConfig.hasBlockListAction(opts.ModuleName,
BlockListKeyKind::ModuleName,
BlockListAction::DowngradeInterfaceVerificationFailure)) {
ctx.Diags.diagnose(SourceLoc(), diag::interface_block_listed_broken,
opts.ModuleName);
return true;
}
return opts.DowngradeInterfaceVerificationError;
}
std::error_code ExplicitModuleInterfaceBuilder::buildSwiftModuleFromInterface(