From 09cf2584bdf2184a67115b4e36038bba9f3e0ff1 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 3 Sep 2021 09:24:35 +0200 Subject: [PATCH] ac/llvm: fix build with LLVM 14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AttributeList::hasAttribute() has been replaced by hasParamAttr()/hasRetAttr(). All supported LLVM versions have hasParamAttr(). Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5320 Signed-off-by: Samuel Pitoiset Reviewed-by: Michel Dänzer Part-of: --- src/amd/llvm/ac_llvm_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp index 0316e1d9f98..b9dd89f29f8 100644 --- a/src/amd/llvm/ac_llvm_helper.cpp +++ b/src/amd/llvm/ac_llvm_helper.cpp @@ -60,7 +60,7 @@ bool ac_is_sgpr_param(LLVMValueRef arg) llvm::Argument *A = llvm::unwrap(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); } LLVMValueRef ac_llvm_get_called_value(LLVMValueRef call)