Merge remote-tracking branch 'origin/master' into llvm6
This commit is contained in:
@@ -175,12 +175,19 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM
|
||||
|
||||
|
||||
LLVMValueRef ZigLLVMBuildCall(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args,
|
||||
unsigned NumArgs, unsigned CC, bool always_inline, const char *Name)
|
||||
unsigned NumArgs, unsigned CC, ZigLLVM_FnInline fn_inline, const char *Name)
|
||||
{
|
||||
CallInst *call_inst = CallInst::Create(unwrap(Fn), makeArrayRef(unwrap(Args), NumArgs), Name);
|
||||
call_inst->setCallingConv(CC);
|
||||
if (always_inline) {
|
||||
call_inst->addAttribute(AttributeList::FunctionIndex, Attribute::AlwaysInline);
|
||||
switch (fn_inline) {
|
||||
case ZigLLVM_FnInlineAuto:
|
||||
break;
|
||||
case ZigLLVM_FnInlineAlways:
|
||||
call_inst->addAttribute(AttributeList::FunctionIndex, Attribute::AlwaysInline);
|
||||
break;
|
||||
case ZigLLVM_FnInlineNever:
|
||||
call_inst->addAttribute(AttributeList::FunctionIndex, Attribute::NoInline);
|
||||
break;
|
||||
}
|
||||
return wrap(unwrap(B)->Insert(call_inst));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user