diff options
author | Richard Biener <rguenther@suse.de> | 2017-09-09 14:04:58 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2017-09-09 10:04:58 -0400 |
commit | b40e004839cdec5991295561829bb41747e98d32 (patch) | |
tree | 7493781ebb5e6b98bb39fd26f869f522cc46696b | |
parent | 95b7c2e0c5439e4e9904c5bc4d78e553a4e802c7 (diff) | |
download | gcc-b40e004839cdec5991295561829bb41747e98d32.zip gcc-b40e004839cdec5991295561829bb41747e98d32.tar.gz gcc-b40e004839cdec5991295561829bb41747e98d32.tar.bz2 |
dwarf2out.c (gen_formal_parameter_die): Remove obsolete hunk.
* dwarf2out.c (gen_formal_parameter_die): Remove obsolete hunk.
Check ultimate_origin before setting reusing_die.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r251938
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 27 |
2 files changed, 10 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b9b0456..01d4251 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-09-09 Richard Biener <rguenther@suse.de> + Jason Merrill <jason@redhat.com> + + * dwarf2out.c (gen_formal_parameter_die): Remove obsolete hunk. + Check ultimate_origin before setting reusing_die. + 2017-09-08 Jason Merrill <jason@redhat.com> PR c++/70029 - ICE with ref-qualifier and -flto diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 651dd0c..cc93db3 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -21285,30 +21285,15 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, dw_die_ref context_die) { tree node_or_origin = node ? node : origin; - tree ultimate_origin; dw_die_ref parm_die = NULL; - if (TREE_CODE_CLASS (TREE_CODE (node_or_origin)) == tcc_declaration) + if (DECL_P (node_or_origin)) { parm_die = lookup_decl_die (node); - /* If the contexts differ, we may not be talking about the same - thing. - ??? When in LTO the DIE parent is the "abstract" copy and the - context_die is the specification "copy". But this whole block - should eventually be no longer needed. */ - if (parm_die && parm_die->die_parent != context_die && !in_lto_p) - { - if (!DECL_ABSTRACT_P (node)) - { - /* This can happen when creating an inlined instance, in - which case we need to create a new DIE that will get - annotated with DW_AT_abstract_origin. */ - parm_die = NULL; - } - else - gcc_unreachable (); - } + tree ultimate_origin = decl_ultimate_origin (node_or_origin); + if (node || ultimate_origin) + origin = ultimate_origin; if (parm_die && parm_die->die_parent == NULL) { @@ -21343,10 +21328,6 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, switch (TREE_CODE_CLASS (TREE_CODE (node_or_origin))) { case tcc_declaration: - ultimate_origin = decl_ultimate_origin (node_or_origin); - if (node || ultimate_origin) - origin = ultimate_origin; - if (reusing_die) goto add_location; |