Commit c582aac9 by Paolo Carlini Committed by Paolo Carlini

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
parent fe96264f
2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
* dwarf2out.c (gen_subprogram_die): Tidy.
2014-03-01 Oleg Endo <olegendo@gcc.gnu.org> 2014-03-01 Oleg Endo <olegendo@gcc.gnu.org>
PR target/60071 PR target/60071
......
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 Jason Merrill <jason@redhat.com> 2014-03-01 Jason Merrill <jason@redhat.com>
PR c++/60379 PR c++/60379
......
...@@ -1465,7 +1465,7 @@ dump_function_decl (cxx_pretty_printer *pp, tree t, int flags) ...@@ -1465,7 +1465,7 @@ dump_function_decl (cxx_pretty_printer *pp, tree t, int flags)
else if (DECL_VIRTUAL_P (t)) else if (DECL_VIRTUAL_P (t))
pp_cxx_ws_string (pp, "virtual"); pp_cxx_ws_string (pp, "virtual");
if (DECL_DECLARED_CONSTEXPR_P (STRIP_TEMPLATE (t))) if (DECL_DECLARED_CONSTEXPR_P (t))
pp_cxx_ws_string (pp, "constexpr"); pp_cxx_ws_string (pp, "constexpr");
} }
......
...@@ -1645,9 +1645,8 @@ implicitly_declare_fn (special_function_kind kind, tree type, ...@@ -1645,9 +1645,8 @@ implicitly_declare_fn (special_function_kind kind, tree type,
/* For an inheriting constructor template, just copy these flags from /* For an inheriting constructor template, just copy these flags from
the inherited constructor template for now. */ the inherited constructor template for now. */
raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (inherited_ctor)); raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (inherited_ctor));
deleted_p = DECL_DELETED_FN (DECL_TEMPLATE_RESULT (inherited_ctor)); deleted_p = DECL_DELETED_FN (inherited_ctor);
constexpr_p constexpr_p = DECL_DECLARED_CONSTEXPR_P (inherited_ctor);
= DECL_DECLARED_CONSTEXPR_P (DECL_TEMPLATE_RESULT (inherited_ctor));
} }
else else
synthesized_method_walk (type, kind, const_p, &raises, &trivial_p, synthesized_method_walk (type, kind, const_p, &raises, &trivial_p,
...@@ -1726,8 +1725,7 @@ implicitly_declare_fn (special_function_kind kind, tree type, ...@@ -1726,8 +1725,7 @@ implicitly_declare_fn (special_function_kind kind, tree type,
TREE_PROTECTED (fn) = TREE_PROTECTED (inherited_ctor); TREE_PROTECTED (fn) = TREE_PROTECTED (inherited_ctor);
/* Copy constexpr from the inherited constructor even if the /* Copy constexpr from the inherited constructor even if the
inheriting constructor doesn't satisfy the requirements. */ inheriting constructor doesn't satisfy the requirements. */
constexpr_p constexpr_p = DECL_DECLARED_CONSTEXPR_P (inherited_ctor);
= DECL_DECLARED_CONSTEXPR_P (STRIP_TEMPLATE (inherited_ctor));
} }
/* Add the "this" parameter. */ /* Add the "this" parameter. */
this_parm = build_this_parm (fn_type, TYPE_UNQUALIFIED); this_parm = build_this_parm (fn_type, TYPE_UNQUALIFIED);
......
...@@ -3941,8 +3941,7 @@ static inline bool ...@@ -3941,8 +3941,7 @@ static inline bool
is_instantiation_of_constexpr (tree fun) is_instantiation_of_constexpr (tree fun)
{ {
return (DECL_TEMPLOID_INSTANTIATION (fun) return (DECL_TEMPLOID_INSTANTIATION (fun)
&& DECL_DECLARED_CONSTEXPR_P (DECL_TEMPLATE_RESULT && DECL_DECLARED_CONSTEXPR_P (DECL_TI_TEMPLATE (fun)));
(DECL_TI_TEMPLATE (fun))));
} }
/* Generate RTL for FN. */ /* Generate RTL for FN. */
......
...@@ -18028,11 +18028,13 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) ...@@ -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, /* If the prototype had an 'auto' or 'decltype(auto)' return type,
emit the real type on the definition die. */ emit the real type on the definition die. */
if (is_cxx() && debug_info_level > DINFO_LEVEL_TERSE 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)) dw_die_ref die = get_AT_ref (old_die, DW_AT_type);
add_type_attribute (subr_die, TREE_TYPE (TREE_TYPE (decl)), if (die == auto_die || die == decltype_auto_die)
0, 0, context_die); add_type_attribute (subr_die, TREE_TYPE (TREE_TYPE (decl)),
0, 0, context_die);
}
} }
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment