From 26385c55fe55531f7306ef5025ff947540235f31 Mon Sep 17 00:00:00 2001 From: kai Date: Sat, 26 Jan 2013 16:27:20 +0100 Subject: [PATCH] More LLVM 3.3 changes to the AttributeSet class. --- gen/functions.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gen/functions.cpp b/gen/functions.cpp index 989bf6e2..238b0df5 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -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) {