2nd attempt on the latest LLVM 3.3 changes.

The previous commit only worked on Windows.
This commit is contained in:
kai 2013-01-26 17:34:08 +01:00
parent 26385c55fe
commit c0284bac2b

View file

@ -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