Skip to content

Commit 0aabe60

Browse files
author
Elliott Slaughter
committed
---
yaml --- r: 28099 b: refs/heads/try c: 38fee95 h: refs/heads/master i: 28097: 22233bb 28095: 18fc6ff v: v3
1 parent 9562bb9 commit 0aabe60

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 5593add3a8da4bb69ecbece5eaef91f01ca748f7
5+
refs/heads/try: 38fee9526a313104e3f869bf07c24b0c1d203d11
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/src/rustc/middle/trans/base.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,12 @@ fn lazily_emit_tydesc_glue(ccx: @crate_ctxt, field: uint,
12331233
fn call_tydesc_glue_full(++bcx: block, v: ValueRef, tydesc: ValueRef,
12341234
field: uint, static_ti: Option<@tydesc_info>) {
12351235
let _icx = bcx.insn_ctxt("call_tydesc_glue_full");
1236-
if bcx.unreachable { return; }
12371236
let ccx = bcx.ccx();
1237+
// NB: Don't short-circuit even if this block is unreachable because
1238+
// GC-based cleanup needs to the see that the roots are live.
1239+
let no_lpads =
1240+
ccx.sess.opts.debugging_opts & session::no_landing_pads != 0;
1241+
if bcx.unreachable && !no_lpads { return; }
12381242

12391243
let static_glue_fn = match static_ti {
12401244
None => None,
@@ -4510,7 +4514,11 @@ fn trans_block_cleanups_(bcx: block,
45104514
/* cleanup_cx: block, */ is_lpad: bool) ->
45114515
block {
45124516
let _icx = bcx.insn_ctxt("trans_block_cleanups");
4513-
if bcx.unreachable { return bcx; }
4517+
// NB: Don't short-circuit even if this block is unreachable because
4518+
// GC-based cleanup needs to the see that the roots are live.
4519+
let no_lpads =
4520+
bcx.ccx().sess.opts.debugging_opts & session::no_landing_pads != 0;
4521+
if bcx.unreachable && !no_lpads { return bcx; }
45144522
let mut bcx = bcx;
45154523
do vec::riter(cleanups) |cu| {
45164524
match cu {

0 commit comments

Comments
 (0)