mirror of
https://github.com/rust-lang/rust
synced 2024-10-14 04:23:37 +00:00
Add push_ctxt
instrumentation to all functions that might call base::zero_mem
.
(Instrumentation work for Issue 22536.)
This commit is contained in:
parent
41f8b1e89b
commit
2d0e6caeec
|
@ -1499,6 +1499,7 @@ pub fn store_local<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
|||
fn create_dummy_locals<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
|
||||
pat: &ast::Pat)
|
||||
-> Block<'blk, 'tcx> {
|
||||
let _icx = push_ctxt("create_dummy_locals");
|
||||
// create dummy memory for the variables if we have no
|
||||
// value to store into them immediately
|
||||
let tcx = bcx.tcx();
|
||||
|
|
|
@ -1007,6 +1007,7 @@ fn trans<'blk>(&self,
|
|||
bcx: Block<'blk, 'tcx>,
|
||||
debug_loc: DebugLoc)
|
||||
-> Block<'blk, 'tcx> {
|
||||
let _icx = base::push_ctxt("<DropValue as Cleanup>::trans");
|
||||
let bcx = if self.is_immediate {
|
||||
glue::drop_ty_immediate(bcx, self.val, self.ty, debug_loc)
|
||||
} else {
|
||||
|
|
|
@ -311,6 +311,7 @@ fn post_store<'blk, 'tcx>(&self,
|
|||
val: ValueRef,
|
||||
ty: Ty<'tcx>)
|
||||
-> Block<'blk, 'tcx> {
|
||||
let _icx = push_ctxt("<Lvalue as KindOps>::post_store");
|
||||
if type_needs_drop(bcx.tcx(), ty) {
|
||||
// cancel cleanup of affine values by zeroing out
|
||||
let () = zero_mem(bcx, val, ty);
|
||||
|
|
|
@ -156,6 +156,8 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
|
|||
let ccx = fcx.ccx;
|
||||
let tcx = bcx.tcx();
|
||||
|
||||
let _icx = push_ctxt("trans_intrinsic_call");
|
||||
|
||||
let ret_ty = match callee_ty.sty {
|
||||
ty::ty_bare_fn(_, ref f) => {
|
||||
ty::erase_late_bound_regions(bcx.tcx(), &f.sig.output())
|
||||
|
|
Loading…
Reference in a new issue