ABIChecker: removing the importation of SwiftOnoneSupport shouldn't be flagged as breakage

SwiftOnoneSupport is automatically imported in the debug mode. When diffing the release build with
a baseline genearted in the debug build, we may hit this false positive.
This commit is contained in:
Xi Ge
2022-08-15 11:58:18 -07:00
parent 227c2ba9a1
commit 3b522c747d

View File

@@ -558,6 +558,11 @@ static void diagnoseRemovedDecl(const SDKNodeDecl *D) {
if (Ctx.getOpts().SkipRemoveDeprecatedCheck &&
D->isDeprecated())
return;
// Don't complain about removing importation of SwiftOnoneSupport.
if (D->getKind() == SDKNodeKind::DeclImport &&
D->getName() == "SwiftOnoneSupport") {
return;
}
D->emitDiag(SourceLoc(), diag::removed_decl, false);
}