Skip to content

Commit 2fec23b

Browse files
committed
AttrlistPtr::get() now requires context as first argument.
This is the first LLVM 3.3 related change.
1 parent 9162724 commit 2fec23b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

gen/functions.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,9 @@ static void set_param_attrs(TypeFunction* f, llvm::Function* func, FuncDeclarati
591591
}
592592
}
593593

594-
#if LDC_LLVM_VER >= 302
594+
#if LDC_LLVM_VER >= 303
595+
llvm::AttrListPtr attrlist = llvm::AttrListPtr::get(gIR->context(), llvm::ArrayRef<llvm::AttributeWithIndex>(attrs));
596+
#elif LDC_LLVM_VER == 302
595597
llvm::AttrListPtr attrlist = llvm::AttrListPtr::get(llvm::ArrayRef<llvm::AttributeWithIndex>(attrs));
596598
#else
597599
llvm::AttrListPtr attrlist = llvm::AttrListPtr::get(attrs.begin(), attrs.end());

gen/tocall.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,9 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
717717
}
718718

719719
// set calling convention and parameter attributes
720-
#if LDC_LLVM_VER >= 302
720+
#if LDC_LLVM_VER >= 303
721+
llvm::AttrListPtr attrlist = llvm::AttrListPtr::get(gIR->context(), llvm::ArrayRef<llvm::AttributeWithIndex>(attrs));
722+
#elif LDC_LLVM_VER == 302
721723
llvm::AttrListPtr attrlist = llvm::AttrListPtr::get(llvm::ArrayRef<llvm::AttributeWithIndex>(attrs));
722724
#else
723725
llvm::AttrListPtr attrlist = llvm::AttrListPtr::get(attrs.begin(), attrs.end());

0 commit comments

Comments
 (0)