mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
dont enforce tails
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
use rustc_middle::ty::layout::{FnAbiOf, HasTypingEnv, LayoutOf};
|
||||
use rustc_middle::ty::{self, Instance, Ty, TypeVisitableExt};
|
||||
use rustc_session::config::CrateType;
|
||||
use rustc_target::callconv::FnAbi;
|
||||
use rustc_target::callconv::{FnAbi, PassMode};
|
||||
use rustc_target::spec::{Arch, RelocModel};
|
||||
use tracing::debug;
|
||||
|
||||
@@ -187,15 +187,22 @@ fn add_function_aliases(
|
||||
args.push(llvm::get_param(alias_lldecl, index));
|
||||
}
|
||||
|
||||
start_bx.tail_call(
|
||||
let call = start_bx.call(
|
||||
fn_ty,
|
||||
Some(attrs),
|
||||
fn_abi,
|
||||
Some(fn_abi),
|
||||
aliasee,
|
||||
&args,
|
||||
None,
|
||||
Some(aliasee_instance),
|
||||
);
|
||||
|
||||
match &fn_abi.ret.mode {
|
||||
PassMode::Ignore | PassMode::Indirect { .. } => start_bx.ret_void(),
|
||||
PassMode::Direct(_) | PassMode::Pair { .. } | PassMode::Cast { .. } => {
|
||||
start_bx.ret(call)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user