Skip to content

Commit bead045

Browse files
committed
Check for is_terminated after translating a block
Closes #861
1 parent 18576e5 commit bead045

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4303,7 +4303,7 @@ fn trans_expr_out(cx: &@block_ctxt, e: &@ast::expr, output: out_method) ->
43034303
with_out_method(bind trans_block(sub_cx, blk, _), cx, e.id,
43044304
output);
43054305
cx.build.Br(sub_cx.llbb);
4306-
sub.bcx.build.Br(next_cx.llbb);
4306+
if !is_terminated(sub.bcx) { sub.bcx.build.Br(next_cx.llbb); }
43074307
ret rslt(next_cx, sub.val);
43084308
}
43094309
ast::expr_copy(a) {

0 commit comments

Comments
 (0)