Commit 9d214a24 authored by Matthias Braun's avatar Matthias Braun
Browse files

adapt current_ir_graph in irg_walk

parent 6f96629f
......@@ -160,11 +160,15 @@ void irg_walk_core(ir_node *node, irg_walk_func *pre, irg_walk_func *post,
void irg_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post,
void *env)
ir_reserve_resources(current_ir_graph, IR_RESOURCE_IRN_VISITED);
assert(current_ir_graph == get_irn_irg(node));
ir_graph *irg = get_irn_irg(node);
ir_graph *rem = current_ir_graph;
current_ir_graph = irg;
ir_reserve_resources(irg, IR_RESOURCE_IRN_VISITED);
irg_walk_core(node, pre, post, env);
ir_free_resources(current_ir_graph, IR_RESOURCE_IRN_VISITED);
ir_free_resources(irg, IR_RESOURCE_IRN_VISITED);
current_ir_graph = rem;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment