mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +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>(
|
||||
fx: &mut FunctionCx<'a, 'tcx>,
|
||||
fn_ty: Ty<'tcx>,
|
||||
|
@ -157,7 +157,7 @@ pub fn trans_fn<'a, 'tcx: 'a>(
|
||||
fx.bcx.ins().jump(ebb, &[]);
|
||||
}
|
||||
TerminatorKind::Return => {
|
||||
fx.bcx.ins().return_(&[]);
|
||||
crate::abi::codegen_return(fx);
|
||||
}
|
||||
TerminatorKind::Assert {
|
||||
cond,
|
||||
|
Loading…
Reference in New Issue
Block a user