From: Matthias Braun Date: Thu, 10 May 2012 19:36:44 +0000 (+0200) Subject: forbid to set current_block to Bad X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=a10a4d1083b97c65a7fd6ee0fff8c075fa8c4ea3;p=libfirm forbid to set current_block to Bad This was used as a hack to mark unreachable code by some people, but it is prefered to simply use a new Block without predecessors, or set NULL if you have to. --- diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index 29683a407..91577ab72 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -528,8 +528,8 @@ void set_cur_block(ir_node *target) void set_r_cur_block(ir_graph *irg, ir_node *target) { assert(get_irg_phase_state(irg) == phase_building); - assert(target == NULL || get_irn_mode(target) == mode_BB); - assert(target == NULL || get_irn_irg(target) == irg); + assert(target == NULL || is_Block(target)); + assert(target == NULL || get_irn_irg(target) == irg); irg->current_block = target; }