1
Fork 0

Remove unused arg from revoke_clean

This commit is contained in:
Brian Anderson 2011-09-21 15:39:46 -07:00
parent 92af552956
commit 42fd2a9d89
2 changed files with 5 additions and 5 deletions

View file

@ -2060,7 +2060,7 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef,
if src.is_mem { ret zero_alloca(cx, src.val, t).bcx; } if src.is_mem { ret zero_alloca(cx, src.val, t).bcx; }
// If we're here, it must be a temporary. // If we're here, it must be a temporary.
ret revoke_clean(cx, src_val, t); ret revoke_clean(cx, src_val);
} else if ty::type_is_unique(tcx, t) || } else if ty::type_is_unique(tcx, t) ||
type_is_structural_or_param(tcx, t) { type_is_structural_or_param(tcx, t) {
if action == DROP_EXISTING { cx = drop_ty(cx, dst, t); } if action == DROP_EXISTING { cx = drop_ty(cx, dst, t); }
@ -2068,7 +2068,7 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef,
if src.is_mem { ret zero_alloca(cx, src_val, t).bcx; } if src.is_mem { ret zero_alloca(cx, src_val, t).bcx; }
// If we're here, it must be a temporary. // If we're here, it must be a temporary.
ret revoke_clean(cx, src_val, t); ret revoke_clean(cx, src_val);
} }
/* FIXME: suggests a type constraint */ /* FIXME: suggests a type constraint */
bcx_ccx(cx).sess.bug("unexpected type in trans::move_val: " + bcx_ccx(cx).sess.bug("unexpected type in trans::move_val: " +
@ -3823,8 +3823,8 @@ fn zero_and_revoke(bcx: @block_ctxt,
for {v, t} in to_zero { for {v, t} in to_zero {
bcx = zero_alloca(bcx, v, t).bcx; bcx = zero_alloca(bcx, v, t).bcx;
} }
for {v, t} in to_revoke { for {v, _} in to_revoke {
bcx = revoke_clean(bcx, v, t); bcx = revoke_clean(bcx, v);
} }
ret bcx; ret bcx;
} }

View file

@ -293,7 +293,7 @@ fn add_clean_temp(cx: @block_ctxt, val: ValueRef, ty: ty::t) {
// to a system where we can also cancel the cleanup on local variables, but // to a system where we can also cancel the cleanup on local variables, but
// this will be more involved. For now, we simply zero out the local, and the // this will be more involved. For now, we simply zero out the local, and the
// drop glue checks whether it is zero. // drop glue checks whether it is zero.
fn revoke_clean(cx: @block_ctxt, val: ValueRef, t: ty::t) -> @block_ctxt { fn revoke_clean(cx: @block_ctxt, val: ValueRef) -> @block_ctxt {
let sc_cx = find_scope_cx(cx); let sc_cx = find_scope_cx(cx);
let found = -1; let found = -1;
let i = 0; let i = 0;