mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 17:43:35 +03:00
2nd attempt on the latest LLVM 3.3 changes.
The previous commit only worked on Windows.
This commit is contained in:
parent
26385c55fe
commit
c0284bac2b
1 changed files with 4 additions and 3 deletions
|
@ -613,11 +613,12 @@ static void set_param_attrs(TypeFunction* f, llvm::Function* func, FuncDeclarati
|
|||
#endif
|
||||
for (size_t i = 0; i < oldAttrs.getNumSlots(); ++i) {
|
||||
#if LDC_LLVM_VER >= 303
|
||||
llvm::AttributeWithIndex curr = llvm::AttributeWithIndex::get(oldAttrs.getSlotIndex(i),
|
||||
const unsigned Index = oldAttrs.getSlotIndex(i);
|
||||
llvm::AttrBuilder &builder = llvm::AttrBuilder(oldAttrs.getSlotAttributes(i), Index).addAttribute(llvm::Attribute::None);
|
||||
llvm::AttributeWithIndex curr = llvm::AttributeWithIndex::get(Index,
|
||||
llvm::Attribute::get(
|
||||
gIR->context(),
|
||||
llvm::AttrBuilder(oldAttrs.getSlotAttributes(i),
|
||||
oldAttrs.getSlotIndex(i))));
|
||||
builder));
|
||||
#else
|
||||
llvm::AttributeWithIndex curr = oldAttrs.getSlot(i);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue