[clang] [llvm] [Clang][BPF] Allow sign extension for int type call parameters (PR #84874)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 09:55:26 PDT 2024
================
@@ -22,6 +22,19 @@ class BPFABIInfo : public DefaultABIInfo {
public:
BPFABIInfo(CodeGenTypes &CGT) : DefaultABIInfo(CGT) {}
+ bool isPromotableIntegerTypeForABI(QualType Ty) const {
+ if (ABIInfo::isPromotableIntegerTypeForABI(Ty) == true)
+ return true;
+
+ if (const auto *BT = Ty->getAs<BuiltinType>()) {
+ // For 'signed int' type, return true to allow sign-extension.
+ if (BT->getKind() == BuiltinType::Int)
----------------
4ast wrote:
should BuiltinType::UInt be included as well?
https://github.com/llvm/llvm-project/pull/84874
More information about the llvm-commits
mailing list