+2017-04-21 Richard Biener <rguenther@suse.de>
+
+ * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
+ (build_distinct_type_copy): Likewise.
+ (build_variant_type_copy): Likewise.
+ * tree.c (build_qualified_type): Pass down mem-stat info.
+ (build_distinct_type_copy): Likewise.
+ (build_variant_type_copy): Likewise.
+
2017-04-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/80237
+2017-04-21 Richard Biener <rguenther@suse.de>
+
+ * cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO.
+ (copy_type): Likewise.
+ * lex.c (copy_decl): Pass down mem-stat info.
+ (copy_type): Likewise.
+
2017-04-20 Jonathan Wakely <jwakely@redhat.com>
PR c++/80473
extern tree build_lang_decl (enum tree_code, tree, tree);
extern tree build_lang_decl_loc (location_t, enum tree_code, tree, tree);
extern void retrofit_lang_decl (tree);
-extern tree copy_decl (tree);
-extern tree copy_type (tree);
+extern tree copy_decl (tree CXX_MEM_STAT_INFO);
+extern tree copy_type (tree CXX_MEM_STAT_INFO);
extern tree cxx_make_type (enum tree_code);
extern tree make_class_type (enum tree_code);
extern bool cxx_init (void);
/* Copy DECL, including any language-specific parts. */
tree
-copy_decl (tree decl)
+copy_decl (tree decl MEM_STAT_DECL)
{
tree copy;
- copy = copy_node (decl);
+ copy = copy_node_stat (decl PASS_MEM_STAT);
cxx_dup_lang_specific_decl (copy);
return copy;
}
/* Copy TYPE, including any language-specific parts. */
tree
-copy_type (tree type)
+copy_type (tree type MEM_STAT_DECL)
{
tree copy;
- copy = copy_node (type);
+ copy = copy_node_stat (type PASS_MEM_STAT);
copy_lang_type (copy);
return copy;
}
exist. This function never returns NULL_TREE. */
tree
-build_qualified_type (tree type, int type_quals)
+build_qualified_type (tree type, int type_quals MEM_STAT_DECL)
{
tree t;
/* If not, build it. */
if (!t)
{
- t = build_variant_type_copy (type);
+ t = build_variant_type_copy (type PASS_MEM_STAT);
set_type_quals (t, type_quals);
if (((type_quals & TYPE_QUAL_ATOMIC) == TYPE_QUAL_ATOMIC))
TYPE_CANONICAL points to itself. */
tree
-build_distinct_type_copy (tree type)
+build_distinct_type_copy (tree type MEM_STAT_DECL)
{
- tree t = copy_node (type);
+ tree t = copy_node_stat (type PASS_MEM_STAT);
TYPE_POINTER_TO (t) = 0;
TYPE_REFERENCE_TO (t) = 0;
require structural equality checks). */
tree
-build_variant_type_copy (tree type)
+build_variant_type_copy (tree type MEM_STAT_DECL)
{
tree t, m = TYPE_MAIN_VARIANT (type);
- t = build_distinct_type_copy (type);
+ t = build_distinct_type_copy (type PASS_MEM_STAT);
/* Since we're building a variant, assume that it is a non-semantic
variant. This also propagates TYPE_STRUCTURAL_EQUALITY_P. */
/* Like get_qualified_type, but creates the type if it does not
exist. This function never returns NULL_TREE. */
-extern tree build_qualified_type (tree, int);
+extern tree build_qualified_type (tree, int CXX_MEM_STAT_INFO);
/* Create a variant of type T with alignment ALIGN. */
/* Make a copy of a type node. */
-extern tree build_distinct_type_copy (tree);
-extern tree build_variant_type_copy (tree);
+extern tree build_distinct_type_copy (tree CXX_MEM_STAT_INFO);
+extern tree build_variant_type_copy (tree CXX_MEM_STAT_INFO);
/* Given a hashcode and a ..._TYPE node (for which the hashcode was made),
return a canonicalized ..._TYPE node, so that duplicates are not made.