summarylogtreecommitdiffstats
path: root/12715 - use hasParamAttr instead of hasAttribute.patch
diff options
context:
space:
mode:
Diffstat (limited to '12715 - use hasParamAttr instead of hasAttribute.patch')
-rw-r--r--12715 - use hasParamAttr instead of hasAttribute.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/12715 - use hasParamAttr instead of hasAttribute.patch b/12715 - use hasParamAttr instead of hasAttribute.patch
new file mode 100644
index 000000000000..067141ff4d42
--- /dev/null
+++ b/12715 - use hasParamAttr instead of hasAttribute.patch
@@ -0,0 +1,24 @@
+--- a/src/amd/llvm/ac_llvm_helper.cpp
++++ b/src/amd/llvm/ac_llvm_helper.cpp
+@@ -60,7 +60,7 @@
+ llvm::Argument *A = llvm::unwrap<llvm::Argument>(arg);
+ llvm::AttributeList AS = A->getParent()->getAttributes();
+ unsigned ArgNo = A->getArgNo();
+- return AS.hasAttribute(ArgNo + 1, llvm::Attribute::InReg);
++ return AS.hasParamAttr(ArgNo, llvm::Attribute::InReg);
+ }
+
+
+--- a/src/gallium/frontends/clover/llvm/codegen/common.cpp
++++ b/src/gallium/frontends/clover/llvm/codegen/common.cpp
+@@ -233,8 +233,8 @@ namespace {
+ }
+
+ } else {
+- const bool needs_sign_ext = f.getAttributes().hasAttribute(
+- arg.getArgNo() + 1, ::llvm::Attribute::SExt);
++ const bool needs_sign_ext = f.getAttributes().hasParamAttr(
++ arg.getArgNo(), ::llvm::Attribute::SExt);
+
+ args.emplace_back(module::argument::scalar, arg_api_size,
+ target_size, target_align,