mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
2nd attempt on the latest LLVM 3.3 changes.
The previous commit only worked on Windows.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user