dwarf2out.c (struct die_struct): Add removed flag.
authorRichard Biener <rguenther@suse.de>
Wed, 28 Sep 2016 14:30:19 +0000 (14:30 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 28 Sep 2016 14:30:19 +0000 (14:30 +0000)
commit8fd57d049ffe9220c16b662a434578fb77bec047
treec6323f1bf248fc5410e81f50a55759b27be58c37
parentcf07c3ded0fdfe4c73b2a83a78126cd60973e0ba
dwarf2out.c (struct die_struct): Add removed flag.

2016-09-28  Richard Biener  <rguenther@suse.de>

* dwarf2out.c (struct die_struct): Add removed flag.
(lookup_type_die): If the DIE is marked as removed, clear
TYPE_SYMTAB_DIE and return NULL.
(lookup_decl_die): If the DIE is marked as removed, remove it
from the hash and return NULL.
(mark_removed): New helper.
(prune_unused_types_prune): Call it for removed DIEs.
(gen_subprogram_die): Move the premark_used_types call to after
DIEs for the functions scopes are generated.
(process_scope_var): Do not re-create pruned types or type decls.
Make sure to also re-parent type decls.
(dwarf2out_finish): Move unused type pruning and debug_types
handling ...
(dwarf2out_early_finish): ... here.

From-SVN: r240578
gcc/ChangeLog
gcc/dwarf2out.c