ABIChecker: exclude decls with the @_alwaysEmitIntoClient attribute

Removing or updating @_alwaysEmitIntoClient functions are never ABI-breaking, thus
we should exclude them from the symbol set for ABI stability checking.

rdar://67883661
This commit is contained in:
Xi Ge
2020-08-27 10:58:45 -07:00
parent b07ecb9efa
commit 1a44db3dcf
4 changed files with 41 additions and 3 deletions

View File

@@ -1603,6 +1603,11 @@ SDKContext::shouldIgnore(Decl *D, const Decl* Parent) const {
if (isa<TypeAliasDecl>(VD))
return true;
}
// Exclude decls with @_alwaysEmitIntoClient if we are checking ABI.
// These decls are considered effectively public because they are usable
// from inline, so we have to manually exclude them here.
if (D->getAttrs().hasAttribute<AlwaysEmitIntoClientAttr>())
return true;
} else {
if (D->isPrivateStdlibDecl(false))
return true;