From: Christian Würdig Date: Wed, 24 Jan 2007 15:57:39 +0000 (+0000) Subject: clear inside irgwalk flag when dumping (otherwise we cannot dump inside an irgwalk) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=6ddcf3c2280092c96f350059c9c2e90415c9b142;hp=5633a7d9ff2694f18bc18f5d98d660a2b95bbbab;p=libfirm clear inside irgwalk flag when dumping (otherwise we cannot dump inside an irgwalk) [r8556] --- diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 38b926058..b21c66584 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -578,10 +578,15 @@ static void collect_node(ir_node * node, void *env) { * Free the list with DEL_ARR_F(). */ static ir_node **construct_block_lists(ir_graph *irg) { - int i, rem_view = get_interprocedural_view(); - ir_graph *rem = current_ir_graph; + int i; + int rem_view = get_interprocedural_view(); + int walk_flag = inside_irg_walk(irg); + ir_graph *rem = current_ir_graph; + current_ir_graph = irg; + clear_inside_irg_walk(current_ir_graph); + for (i = get_irp_n_irgs() - 1; i >= 0; --i) ird_set_irg_link(get_irp_irg(i), NULL); @@ -597,6 +602,9 @@ static ir_node **construct_block_lists(ir_graph *irg) { set_interprocedural_view(rem_view); + if (walk_flag) + set_inside_irg_walk(current_ir_graph); + current_ir_graph = rem; return ird_get_irg_link(irg); }