1
Fork 0

Remove outdated unreachable check from call_visit_glue

`call_visit_glue` is only ever called from trans_intrinsic, and the
block won't be unreachable there. Also, the comment doesn't make sense
anymore. When the code was introduced in 38fee9526a the function was
also responsible for the cleanup glue, which is no longer the case.

While we're at it, also fixed the debug message to output the right
function name.
This commit is contained in:
Björn Steinbrink 2014-07-06 12:02:40 +02:00
parent 5ddc7b4a25
commit 33a4dd824f

View file

@ -180,12 +180,8 @@ pub fn lazily_emit_visit_glue(ccx: &CrateContext, ti: &tydesc_info) -> ValueRef
// See [Note-arg-mode]
pub fn call_visit_glue(bcx: &Block, v: ValueRef, tydesc: ValueRef,
static_ti: Option<&tydesc_info>) {
let _icx = push_ctxt("call_tydesc_glue_full");
let _icx = push_ctxt("call_visit_glue");
let ccx = bcx.ccx();
// NB: Don't short-circuit even if this block is unreachable because
// GC-based cleanup needs to the see that the roots are live.
if bcx.unreachable.get() && !ccx.sess().no_landing_pads() { return; }
let static_glue_fn = static_ti.map(|sti| lazily_emit_visit_glue(ccx, sti));
// When static type info is available, avoid casting to a generic pointer.