提交 bead045f 编写于 作者: M Marijn Haverbeke

Check for is_terminated after translating a block

Closes #861
上级 18576e55
......@@ -4303,7 +4303,7 @@ fn trans_expr_out(cx: &@block_ctxt, e: &@ast::expr, output: out_method) ->
with_out_method(bind trans_block(sub_cx, blk, _), cx, e.id,
output);
cx.build.Br(sub_cx.llbb);
sub.bcx.build.Br(next_cx.llbb);
if !is_terminated(sub.bcx) { sub.bcx.build.Br(next_cx.llbb); }
ret rslt(next_cx, sub.val);
}
ast::expr_copy(a) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册