[llvm] [IR] Do not inherit ABI attributes from the callee (PR #207173)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 09:55:13 PDT 2026
================
@@ -842,6 +842,28 @@ bool Attribute::canUseAsRetAttr(AttrKind Kind) {
return hasAttributeProperty(Kind, AttributeProperty::RetAttr);
}
+bool Attribute::isABIAttr(AttrKind Kind) {
+ switch (Kind) {
+ case Attribute::ByRef:
+ case Attribute::ByVal:
+ case Attribute::InAlloca:
+ case Attribute::InReg:
+ case Attribute::Nest:
+ case Attribute::NoExt:
+ case Attribute::Preallocated:
+ case Attribute::SExt:
+ case Attribute::StackAlignment:
+ case Attribute::StructRet:
+ case Attribute::SwiftAsync:
+ case Attribute::SwiftError:
+ case Attribute::SwiftSelf:
+ case Attribute::ZExt:
+ return true;
+ default:
+ return false;
----------------
efriedma-quic wrote:
I'd prefer to list out the attributes here, so attributes don't accidentally default to non-ABI.
https://github.com/llvm/llvm-project/pull/207173
More information about the llvm-commits
mailing list