Move return codegen to abi.rs
This commit is contained in:
parent
4df09f7325
commit
b391524b4f
2 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue