summaryrefslogtreecommitdiffhomepage
path: root/ir/common
diff options
context:
space:
mode:
authorAndreas Seltenreich <andreas+git@gate450.dyndns.org>2014-02-10 16:38:07 +0100
committerAndreas Seltenreich <andreas+git@gate450.dyndns.org>2014-02-10 16:45:00 +0100
commitc40d357755b01d6d70cc25925eba7ba9b8843f0b (patch)
tree3f33c3aefb5b859f7e087c9ec40673cb83102d7a /ir/common
parentb7bea988923a3f9550e3719468d97e63f5ebc058 (diff)
irn_copy_into_irg: Fix irg attributes after copying.
Diffstat (limited to 'ir/common')
-rw-r--r--ir/common/irtools.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ir/common/irtools.c b/ir/common/irtools.c
index 489c52d..f3aa27d 100644
--- a/ir/common/irtools.c
+++ b/ir/common/irtools.c
@@ -136,6 +136,10 @@ ir_node *irn_copy_into_irg(const ir_node *node, ir_graph *irg)
/* copy the attributes */
copy_node_attr(irg, node, res);
+ /* fix irg attribute */
+ if (ir_has_irg_ref(res))
+ res->attr.irg.irg = irg;
+
/* duplicate dependency edges */
for (int i = 0, n_deps = get_irn_n_deps(node); i < n_deps; ++i) {
ir_node *dep = get_irn_dep(node, i);