Skip to content

Commit 12c0f0d

Browse files
Update compiler/rustc_codegen_llvm/src/builder.rs
Co-authored-by: waffle <[email protected]>
1 parent 58c6633 commit 12c0f0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_codegen_llvm/src/builder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
14431443
instance: Option<Instance<'tcx>>,
14441444
) {
14451445
let call = self.call(llty, fn_attrs, Some(fn_abi), llfn, args, funclet, instance);
1446+
llvm::LLVMRustSetTailCallKind(call, llvm::TailCallKind::MustTail);
14461447

14471448
match &fn_abi.ret.mode {
14481449
PassMode::Ignore | PassMode::Indirect { .. } => self.ret_void(),
@@ -1451,8 +1452,6 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
14511452
bug!("Encountered `PassMode::{mode:?}` during codegen")
14521453
}
14531454
}
1454-
1455-
llvm::LLVMRustSetTailCallKind(call, llvm::TailCallKind::MustTail);
14561455
}
14571456

14581457
fn zext(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value {

0 commit comments

Comments
 (0)