From: Christoph Mallon Date: Wed, 6 Apr 2011 13:27:06 +0000 (+0200) Subject: Fix regression: Allow setting the current block to NULL. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=981b92cfea68537b766dfacc53e45f39c9ba92f1;p=libfirm Fix regression: Allow setting the current block to NULL. --- diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index 0b765a41e..810f225bf 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -543,13 +543,13 @@ void add_immBlock_pred(ir_node *block, ir_node *jmp) void set_cur_block(ir_node *target) { - assert(current_ir_graph == get_irn_irg(target)); + assert(target == NULL || current_ir_graph == get_irn_irg(target)); current_ir_graph->current_block = target; } void set_r_cur_block(ir_graph *irg, ir_node *target) { - assert(irg == get_irn_irg(target)); + assert(target == NULL || irg == get_irn_irg(target)); irg->current_block = target; }