Already on list by Marek <https://patchwork.freedesktop.org/patch/145440/>
Vedran Miletić wrote on 22.03.2017 16:01: > AttributeSet got renamed to AttributeList. > > Signed-off-by: Vedran Miletić <[email protected]> > --- > src/amd/common/ac_llvm_helper.cpp | 10 ++++++++-- > src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 +++++++- > 2 files changed, 15 insertions(+), 3 deletions(-) > > diff --git a/src/amd/common/ac_llvm_helper.cpp > b/src/amd/common/ac_llvm_helper.cpp > index 4f03103..01a981b 100644 > --- a/src/amd/common/ac_llvm_helper.cpp > +++ b/src/amd/common/ac_llvm_helper.cpp > @@ -35,18 +35,24 @@ > #include <llvm/ExecutionEngine/ExecutionEngine.h> > #include <llvm/IR/Attributes.h> > > +#if HAVE_LLVM >= 0x0500 > + typedef llvm::AttributeList llvm_attribute_list; > +#else > + typedef llvm::AttributeSet llvm_attribute_list; > +#endif > + > 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::AttributeSet::get(A->getContext(), A->getArgNo() + 1, > B)); > + A->addAttr(llvm_attribute_list::get(A->getContext(), A->getArgNo() + 1, > B)); > } > > bool ac_is_sgpr_param(LLVMValueRef arg) > { > llvm::Argument *A = llvm::unwrap<llvm::Argument>(arg); > - llvm::AttributeSet AS = A->getParent()->getAttributes(); > + llvm_attribute_list AS = A->getParent()->getAttributes(); > unsigned ArgNo = A->getArgNo(); > return AS.hasAttribute(ArgNo + 1, llvm::Attribute::ByVal) || > AS.hasAttribute(ArgNo + 1, llvm::Attribute::InReg); > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp > b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp > index 444686f..e2ea6e8 100644 > --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp > +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp > @@ -86,6 +86,12 @@ > # pragma pop_macro("DEBUG") > #endif > > +#if HAVE_LLVM >= 0x0500 > + typedef llvm::AttributeList llvm_attribute_list; > +#else > + typedef llvm::AttributeSet llvm_attribute_list; > +#endif > + > #include "c11/threads.h" > #include "os/os_thread.h" > #include "pipe/p_config.h" > @@ -754,7 +760,7 @@ lp_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::AttributeSet::get(A->getContext(), A->getArgNo() + 1, > B)); > + A->addAttr(llvm_attribute_list::get(A->getContext(), A->getArgNo() + 1, > B)); > #endif > } > > -- Kai Wasserbäch (Kai Wasserbaech) E-Mail: [email protected]
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
