Merge branch 'master' into merge-2.061-2

This commit is contained in:
kai
2013-01-26 17:40:24 +01:00
2 changed files with 15 additions and 4 deletions

View File

@@ -612,7 +612,16 @@ 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
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(),
builder));
#else
llvm::AttributeWithIndex curr = oldAttrs.getSlot(i);
#endif
bool found = false;
for (size_t j = 0; j < newSize; ++j) {