Add missing lifetime intrinsics in a few places
This commit is contained in:
parent
6c512dc52b
commit
95337a2978
@ -730,8 +730,9 @@ impl<'blk, 'tcx> CleanupHelperMethods<'blk, 'tcx> for FunctionContext<'blk, 'tcx
|
||||
let prev_bcx = self.new_block(true, "resume", None);
|
||||
let personality = self.personality.get().expect(
|
||||
"create_landing_pad() should have set this");
|
||||
build::Resume(prev_bcx,
|
||||
build::Load(prev_bcx, personality));
|
||||
let lp = build::Load(prev_bcx, personality);
|
||||
base::call_lifetime_end(prev_bcx, personality);
|
||||
build::Resume(prev_bcx, lp);
|
||||
prev_llbb = prev_bcx.llbb;
|
||||
break;
|
||||
}
|
||||
|
@ -432,6 +432,7 @@ pub fn trans_native_call<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
||||
// - Truncating foreign type to correct integral type and then
|
||||
// bitcasting to the struct type yields invalid cast errors.
|
||||
let llscratch = base::alloca(bcx, llforeign_ret_ty, "__cast");
|
||||
base::call_lifetime_start(bcx, llscratch);
|
||||
Store(bcx, llforeign_retval, llscratch);
|
||||
let llscratch_i8 = BitCast(bcx, llscratch, Type::i8(ccx).ptr_to());
|
||||
let llretptr_i8 = BitCast(bcx, llretptr, Type::i8(ccx).ptr_to());
|
||||
@ -442,6 +443,7 @@ pub fn trans_native_call<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
||||
debug!("llrust_size={}", llrust_size);
|
||||
base::call_memcpy(bcx, llretptr_i8, llscratch_i8,
|
||||
C_uint(ccx, llrust_size), llalign as u32);
|
||||
base::call_lifetime_end(bcx, llscratch);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,9 @@ pub fn drop_ty_immediate<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
||||
let vp = alloca(bcx, type_of(bcx.ccx(), t), "");
|
||||
call_lifetime_start(bcx, vp);
|
||||
store_ty(bcx, v, vp, t);
|
||||
drop_ty_core(bcx, vp, t, debug_loc, skip_dtor, None)
|
||||
let bcx = drop_ty_core(bcx, vp, t, debug_loc, skip_dtor, None);
|
||||
call_lifetime_end(bcx, vp);
|
||||
bcx
|
||||
}
|
||||
|
||||
pub fn get_drop_glue<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) -> ValueRef {
|
||||
|
@ -966,6 +966,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
|
||||
match dest {
|
||||
expr::Ignore => {
|
||||
bcx = glue::drop_ty(bcx, llresult, ret_ty, call_debug_location);
|
||||
call_lifetime_end(bcx, llresult);
|
||||
}
|
||||
expr::SaveIn(_) => {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user