Use LLVMSetTailCallKind
This commit is contained in:
@@ -1453,7 +1453,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
||||
instance: Option<Instance<'tcx>>,
|
||||
) {
|
||||
let call = self.call(llty, fn_attrs, Some(fn_abi), llfn, args, funclet, instance);
|
||||
llvm::LLVMRustSetTailCallKind(call, llvm::TailCallKind::MustTail);
|
||||
llvm::LLVMSetTailCallKind(call, llvm::TailCallKind::MustTail);
|
||||
|
||||
match &fn_abi.ret.mode {
|
||||
PassMode::Ignore | PassMode::Indirect { .. } => self.ret_void(),
|
||||
|
||||
@@ -97,6 +97,7 @@ pub(crate) enum ModuleFlagMergeBehavior {
|
||||
|
||||
// Consts for the LLVM CallConv type, pre-cast to usize.
|
||||
|
||||
/// Must match the layout of `LLVMTailCallKind`.
|
||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||
#[repr(C)]
|
||||
#[allow(dead_code)]
|
||||
@@ -1197,7 +1198,7 @@ unsafe extern "C" {
|
||||
pub(crate) safe fn LLVMIsGlobalConstant(GlobalVar: &Value) -> Bool;
|
||||
pub(crate) safe fn LLVMSetGlobalConstant(GlobalVar: &Value, IsConstant: Bool);
|
||||
pub(crate) safe fn LLVMSetTailCall(CallInst: &Value, IsTailCall: Bool);
|
||||
pub(crate) safe fn LLVMRustSetTailCallKind(CallInst: &Value, Kind: TailCallKind);
|
||||
pub(crate) safe fn LLVMSetTailCallKind(CallInst: &Value, kind: TailCallKind);
|
||||
|
||||
// Operations on attributes
|
||||
pub(crate) fn LLVMCreateStringAttribute(
|
||||
|
||||
Reference in New Issue
Block a user