Move return codegen to abi.rs

This commit is contained in:
bjorn3 2018-08-11 11:01:48 +02:00
parent 4df09f7325
commit b391524b4f
2 changed files with 5 additions and 1 deletions

View File

@ -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>,

View File

@ -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,