.collect::<Vec<_>>()
};
+ let destination = destination.as_ref().map(|(place, bb)| {
+ (trans_place(fx, place), *bb)
+ });
+
if codegen_intrinsic_call(fx, fn_ty, sig, &args, destination) {
return;
}
let return_ptr = match destination {
- Some((place, _)) => trans_place(fx, place).expect_addr(),
+ Some((place, _)) => place.expect_addr(),
None => fx.bcx.ins().iconst(types::I64, 0),
};
fx.bcx.ins().call_indirect(sig, func, &call_args);
}
}
- if let Some((_, dest)) = *destination {
+ if let Some((_, dest)) = destination {
let ret_ebb = fx.get_ebb(dest);
fx.bcx.ins().jump(ret_ebb, &[]);
} else {
fn_ty: Ty<'tcx>,
sig: FnSig<'tcx>,
args: &[CValue<'tcx>],
- destination: &Option<(Place<'tcx>, BasicBlock)>,
+ destination: Option<(CPlace<'tcx>, BasicBlock)>,
) -> bool {
if let TypeVariants::TyFnDef(def_id, substs) = fn_ty.sty {
if sig.abi == Abi::RustIntrinsic {
let intrinsic = &intrinsic[..];
let ret = match destination {
- Some((place, _)) => trans_place(fx, place),
+ Some((place, _)) => place,
None => {
println!(
"codegen_call(fx, _, {:?}, {:?})",
_ => unimpl!("unsupported intrinsic {}", intrinsic),
}
- if let Some((_, dest)) = *destination {
+ if let Some((_, dest)) = destination {
let ret_ebb = fx.get_ebb(dest);
fx.bcx.ins().jump(ret_ebb, &[]);
} else {