mono_llvm_set_call_notail (LLVMValueRef func)
{
#if LLVM_API_VERSION > 100
- //unwrap<CallInst>(func)->setTailCallKind (CallInst::TailCallKind::TCK_NoTail);
+ unwrap<CallInst>(func)->setTailCallKind (CallInst::TailCallKind::TCK_NoTail);
#endif
}
lcall = emit_call (ctx, bb, &builder, callee, args, LLVMCountParamTypes (llvm_sig));
+ if (ins->opcode != OP_TAILCALL && LLVMGetInstructionOpcode (lcall) == LLVMCall)
+ mono_llvm_set_call_notail (lcall);
+
/*
* Modify cconv and parameter attributes to pass rgctx/imt correctly.
*/