mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Move return codegen to abi.rs
This commit is contained in:
parent
4df09f7325
commit
b391524b4f
@ -386,6 +386,10 @@ pub fn codegen_call<'a, 'tcx: 'a>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn codegen_return(fx: &mut FunctionCx) {
|
||||||
|
fx.bcx.ins().return_(&[]);
|
||||||
|
}
|
||||||
|
|
||||||
fn codegen_intrinsic_call<'a, 'tcx: 'a>(
|
fn codegen_intrinsic_call<'a, 'tcx: 'a>(
|
||||||
fx: &mut FunctionCx<'a, 'tcx>,
|
fx: &mut FunctionCx<'a, 'tcx>,
|
||||||
fn_ty: Ty<'tcx>,
|
fn_ty: Ty<'tcx>,
|
||||||
|
@ -157,7 +157,7 @@ pub fn trans_fn<'a, 'tcx: 'a>(
|
|||||||
fx.bcx.ins().jump(ebb, &[]);
|
fx.bcx.ins().jump(ebb, &[]);
|
||||||
}
|
}
|
||||||
TerminatorKind::Return => {
|
TerminatorKind::Return => {
|
||||||
fx.bcx.ins().return_(&[]);
|
crate::abi::codegen_return(fx);
|
||||||
}
|
}
|
||||||
TerminatorKind::Assert {
|
TerminatorKind::Assert {
|
||||||
cond,
|
cond,
|
||||||
|
Loading…
Reference in New Issue
Block a user