More LLVM 3.3 changes to the AttributeSet class.

This commit is contained in:
kai
2013-01-26 16:27:20 +01:00
parent b2f4ac0772
commit 26385c55fe

View File

@@ -612,7 +612,15 @@ static void set_param_attrs(TypeFunction* f, llvm::Function* func, FuncDeclarati
llvm::AttrListPtr oldAttrs = func->getAttributes();
#endif
for (size_t i = 0; i < oldAttrs.getNumSlots(); ++i) {
#if LDC_LLVM_VER >= 303
llvm::AttributeWithIndex curr = llvm::AttributeWithIndex::get(oldAttrs.getSlotIndex(i),
llvm::Attribute::get(
gIR->context(),
llvm::AttrBuilder(oldAttrs.getSlotAttributes(i),
oldAttrs.getSlotIndex(i))));
#else
llvm::AttributeWithIndex curr = oldAttrs.getSlot(i);
#endif
bool found = false;
for (size_t j = 0; j < newSize; ++j) {