diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f69c588..1b2c04c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7918,6 +7918,19 @@ generate_skeleton_bottom_up (skeleton_chain_node *parent) add_child_die (parent->new_die, c); c = prev; } + else if (c->comdat_type_p) + { + /* This is the skeleton of earlier break_out_comdat_types + type. Clone the existing DIE, but keep the children + under the original (which is in the main CU). */ + dw_die_ref clone = clone_die (c); + + replace_child (c, clone, prev); + generate_skeleton_ancestor_tree (parent); + add_child_die (parent->new_die, c); + c = clone; + continue; + } else { /* Clone the existing DIE, move the original to the skeleton @@ -7936,6 +7949,7 @@ generate_skeleton_bottom_up (skeleton_chain_node *parent) replace_child (c, clone, prev); generate_skeleton_ancestor_tree (parent); add_child_die (parent->new_die, c); + node.old_die = clone; node.new_die = c; c = clone; } |