Module: Mesa
Branch: main
Commit: d4f7337d14eb8c135a9a89dcd0e01fc93214a927
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4f7337d14eb8c135a9a89dcd0e01fc93214a927

Author: Kai Wasserbäch <[email protected]>
Date:   Sat Sep  4 14:01:39 2021 +0200

fix(clover/llvm): update code to build with recent versions of LLVM 14 (Git)

`hasAttribute()` in `llvm::AttributeList` is gone, use `hasParamAttr()` instead.

This fixes an FTBFS.

Signed-off-by: Kai Wasserbäch <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12826>

---

 src/gallium/frontends/clover/llvm/codegen/common.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/frontends/clover/llvm/codegen/common.cpp 
b/src/gallium/frontends/clover/llvm/codegen/common.cpp
index 2ed46794def..13cb91547ac 100644
--- 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,

Reply via email to