[Mesa-dev] [PATCH] ac: fix build after LLVM 5.0 SVN r300718

Christoph Haag haagch+mesadev at frickel.club
Thu Apr 20 08:04:36 UTC 2017


From: Christoph Haag <haagch at frickel.club>

Signed-off-by: Christoph Haag <haagch at frickel.club>
---
 src/amd/common/ac_llvm_helper.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp
index d9ea4b162e..69d65ddffe 100644
--- a/src/amd/common/ac_llvm_helper.cpp
+++ b/src/amd/common/ac_llvm_helper.cpp
@@ -44,9 +44,7 @@ typedef AttributeSet AttributeList;
 void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes)
 {
    llvm::Argument *A = llvm::unwrap<llvm::Argument>(val);
-   llvm::AttrBuilder B;
-   B.addDereferenceableAttr(bytes);
-   A->addAttr(llvm::AttributeList::get(A->getContext(), A->getArgNo() + 1,  B));
+   A->addAttr(llvm::Attribute::getWithDereferenceableBytes(A->getContext(), bytes));
 }
 
 bool ac_is_sgpr_param(LLVMValueRef arg)
-- 
2.12.2



More information about the mesa-dev mailing list