mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 01:10:16 +01:00
ac: fix build after LLVM 5.0 SVN r300718
v2: previously getWithDereferenceableBytes() exists, but addAttr() doesn't take that type Signed-off-by: Christoph Haag <haagch+mesadev@frickel.club> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-and-reviewed-by: Mike Lothian <mike@fireburn.co.uk>
This commit is contained in:
parent
3af7f8275b
commit
a9d27c8a33
1 changed files with 4 additions and 0 deletions
|
|
@ -44,9 +44,13 @@ typedef AttributeSet AttributeList;
|
|||
void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes)
|
||||
{
|
||||
llvm::Argument *A = llvm::unwrap<llvm::Argument>(val);
|
||||
#if HAVE_LLVM < 0x0500
|
||||
llvm::AttrBuilder B;
|
||||
B.addDereferenceableAttr(bytes);
|
||||
A->addAttr(llvm::AttributeList::get(A->getContext(), A->getArgNo() + 1, B));
|
||||
#else
|
||||
A->addAttr(llvm::Attribute::getWithDereferenceableBytes(A->getContext(), bytes));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ac_is_sgpr_param(LLVMValueRef arg)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue