Commit 3da7d774 by Jason Merrill Committed by Jason Merrill

tree.c (build_constructor): Add MEM_STAT_DECL.

	* tree.c (build_constructor): Add MEM_STAT_DECL.

gcc/cp/
	* constexpr.c (unshare_constructor): Add MEM_STAT_DECL.

From-SVN: r272428
parent 57d6f4d0
2019-06-18 Jason Merrill <jason@redhat.com>
* tree.c (build_constructor): Add MEM_STAT_DECL.
2019-06-18 Richard Sandiford <richard.sandiford@arm.com> 2019-06-18 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64-modes.def (CC_NZC): New CC_MODE. * config/aarch64/aarch64-modes.def (CC_NZC): New CC_MODE.
......
2019-06-18 Jason Merrill <jason@redhat.com>
* constexpr.c (unshare_constructor): Add MEM_STAT_DECL.
2019-06-17 Jakub Jelinek <jakub@redhat.com> 2019-06-17 Jakub Jelinek <jakub@redhat.com>
* semantics.c (finish_omp_clauses): For OMP_CLAUSE_REDUCTION_INSCAN * semantics.c (finish_omp_clauses): For OMP_CLAUSE_REDUCTION_INSCAN
......
...@@ -1331,7 +1331,7 @@ adjust_temp_type (tree type, tree temp) ...@@ -1331,7 +1331,7 @@ adjust_temp_type (tree type, tree temp)
modifications don't affect other places where it was used. */ modifications don't affect other places where it was used. */
tree tree
unshare_constructor (tree t) unshare_constructor (tree t MEM_STAT_DECL)
{ {
if (!t || TREE_CODE (t) != CONSTRUCTOR) if (!t || TREE_CODE (t) != CONSTRUCTOR)
return t; return t;
...@@ -1340,8 +1340,8 @@ unshare_constructor (tree t) ...@@ -1340,8 +1340,8 @@ unshare_constructor (tree t)
while (!ptrs.is_empty ()) while (!ptrs.is_empty ())
{ {
tree *p = ptrs.pop (); tree *p = ptrs.pop ();
tree n = copy_node (*p); tree n = copy_node (*p PASS_MEM_STAT);
CONSTRUCTOR_ELTS (n) = vec_safe_copy (CONSTRUCTOR_ELTS (*p)); CONSTRUCTOR_ELTS (n) = vec_safe_copy (CONSTRUCTOR_ELTS (*p) PASS_MEM_STAT);
*p = n; *p = n;
vec<constructor_elt, va_gc> *v = CONSTRUCTOR_ELTS (n); vec<constructor_elt, va_gc> *v = CONSTRUCTOR_ELTS (n);
constructor_elt *ce; constructor_elt *ce;
......
...@@ -7725,7 +7725,7 @@ extern void explain_invalid_constexpr_fn (tree); ...@@ -7725,7 +7725,7 @@ extern void explain_invalid_constexpr_fn (tree);
extern vec<tree> cx_error_context (void); extern vec<tree> cx_error_context (void);
extern tree fold_sizeof_expr (tree); extern tree fold_sizeof_expr (tree);
extern void clear_cv_and_fold_caches (void); extern void clear_cv_and_fold_caches (void);
extern tree unshare_constructor (tree); extern tree unshare_constructor (tree CXX_MEM_STAT_INFO);
/* In cp-ubsan.c */ /* In cp-ubsan.c */
extern void cp_ubsan_maybe_instrument_member_call (tree); extern void cp_ubsan_maybe_instrument_member_call (tree);
......
...@@ -2023,9 +2023,9 @@ verify_constructor_flags (tree c) ...@@ -2023,9 +2023,9 @@ verify_constructor_flags (tree c)
/* Return a new CONSTRUCTOR node whose type is TYPE and whose values /* Return a new CONSTRUCTOR node whose type is TYPE and whose values
are in the vec pointed to by VALS. */ are in the vec pointed to by VALS. */
tree tree
build_constructor (tree type, vec<constructor_elt, va_gc> *vals) build_constructor (tree type, vec<constructor_elt, va_gc> *vals MEM_STAT_DECL)
{ {
tree c = make_node (CONSTRUCTOR); tree c = make_node (CONSTRUCTOR PASS_MEM_STAT);
TREE_TYPE (c) = type; TREE_TYPE (c) = type;
CONSTRUCTOR_ELTS (c) = vals; CONSTRUCTOR_ELTS (c) = vals;
......
...@@ -4247,7 +4247,7 @@ extern tree build_vec_series (tree, tree, tree); ...@@ -4247,7 +4247,7 @@ extern tree build_vec_series (tree, tree, tree);
extern tree build_index_vector (tree, poly_uint64, poly_uint64); extern tree build_index_vector (tree, poly_uint64, poly_uint64);
extern void recompute_constructor_flags (tree); extern void recompute_constructor_flags (tree);
extern void verify_constructor_flags (tree); extern void verify_constructor_flags (tree);
extern tree build_constructor (tree, vec<constructor_elt, va_gc> *); extern tree build_constructor (tree, vec<constructor_elt, va_gc> * CXX_MEM_STAT_INFO);
extern tree build_constructor_single (tree, tree, tree); extern tree build_constructor_single (tree, tree, tree);
extern tree build_constructor_from_list (tree, tree); extern tree build_constructor_from_list (tree, tree);
extern tree build_constructor_va (tree, int, ...); extern tree build_constructor_va (tree, int, ...);
......
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