2016-09-28 Richard Biener <rguenther@suse.de>
commita124fe8b3706447db1b0b828c218f486512da980
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Sep 2016 14:30:19 +0000 (28 14:30 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Sep 2016 14:30:19 +0000 (28 14:30 +0000)
treec6323f1bf248fc5410e81f50a55759b27be58c37
parentf525bed6911de9b9c131b554274ce1c1d7732ea3
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240578 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/dwarf2out.c