aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2014-03-01 21:14:00 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2014-03-01 21:14:00 +0000
commitc582aac943fe2574a03cb5f557a3ee1e5d6585f1 (patch)
treeef52272f484a2478ef4bd8ecdfd176588c6d1e78 /gcc/dwarf2out.c
parentfe96264ffc4bbbe1516f9c59cb2d4a689fbf5f24 (diff)
downloadgcc-c582aac943fe2574a03cb5f557a3ee1e5d6585f1.zip
gcc-c582aac943fe2574a03cb5f557a3ee1e5d6585f1.tar.gz
gcc-c582aac943fe2574a03cb5f557a3ee1e5d6585f1.tar.bz2
method.c (implicitly_declare_fn): Remove redundant DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
/cp 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com> * method.c (implicitly_declare_fn): Remove redundant DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses. * semantics.c (is_instantiation_of_constexpr): Likewise. * error.c (dump_function_decl): Likewise. 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com> * dwarf2out.c (gen_subprogram_die): Tidy. From-SVN: r208248
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 1c3ff03..2b584a5 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -18028,11 +18028,13 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
/* If the prototype had an 'auto' or 'decltype(auto)' return type,
emit the real type on the definition die. */
- if (is_cxx() && debug_info_level > DINFO_LEVEL_TERSE
- && (get_AT_ref (old_die, DW_AT_type) == auto_die
- || get_AT_ref (old_die, DW_AT_type) == decltype_auto_die))
- add_type_attribute (subr_die, TREE_TYPE (TREE_TYPE (decl)),
- 0, 0, context_die);
+ if (is_cxx() && debug_info_level > DINFO_LEVEL_TERSE)
+ {
+ dw_die_ref die = get_AT_ref (old_die, DW_AT_type);
+ if (die == auto_die || die == decltype_auto_die)
+ add_type_attribute (subr_die, TREE_TYPE (TREE_TYPE (decl)),
+ 0, 0, context_die);
+ }
}
}
else