Commit 232364e4 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

proc_cloning: Reserve the irn link resource when cloning an irg.

This fixes opt/proc_cloning001.c.
parent 2d6405d1
......@@ -360,6 +360,7 @@ static ir_node *get_irg_arg(ir_graph *irg, size_t pos)
static void create_clone_proc_irg(ir_entity *ent, const quadruple_t *q)
{
ir_graph *const method_irg = get_entity_linktime_irg(ent);
ir_reserve_resources(method_irg, IR_RESOURCE_IRN_LINK);
/* We create the skeleton of the clone irg.*/
ir_graph *const clone_irg = new_ir_graph(ent, 0);
......@@ -380,6 +381,7 @@ static void create_clone_proc_irg(ir_entity *ent, const quadruple_t *q)
/* The "cloned" graph must be matured. */
irg_finalize_cons(clone_irg);
ir_free_resources(method_irg, IR_RESOURCE_IRN_LINK);
}
/**
......
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