aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2019-05-28 13:31:16 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2019-05-28 13:31:16 +0000
commit7daef9aceb80787d9fd64b4e110b175b4d9e5a9e (patch)
treee8ff7e7170740fbcd3cf83d7662f6be7b2bf2ee0 /gcc/lto-streamer-out.c
parent3253d4f0266fb7aa4e70cf6afcfac9b690cfed4a (diff)
downloadgcc-7daef9aceb80787d9fd64b4e110b175b4d9e5a9e.zip
gcc-7daef9aceb80787d9fd64b4e110b175b4d9e5a9e.tar.gz
gcc-7daef9aceb80787d9fd64b4e110b175b4d9e5a9e.tar.bz2
[PATCH] Commonize anon-name generation
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg01699.html * tree.h (IDENTIFIER_ANON_P): New. (anon_aggrname_format, anon_aggname_p): Don't declare. (make_anon_name): Declare. * lto-streamer-out.c (DFS::DFS_write_tree_body): Use IDENTIFIER_ANON_P. (hash_tree): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree): Likewise. * tree.c (anon_aggrname_p, anon_aggrname_format): Delete. (anon_cnt, make_anon_name): New. gcc/cp/ * cp-tree.h (make_anon_name): Drop declaration. (TYPE_UNNAMED_P): Use IDENTIFIER_ANON_P. * cp-lang.c (cxx_dwarf_name): Likewise. * class.c (find_flexarrays): Likewise. * decl.c (name_unnamed_type, xref_tag_1): Likewise. * error.c (dump_aggr_type): Likewise. * pt.c (push_template_decl_real): Likewise. * name-lookup.c (consider_binding_level): Likewise. (anon_cnt, make_anon_name): Delete. gcc/d/ * types.cc (fixup_anonymous_offset): Use IDENTIFIER_ANON_P. (layout_aggregate_members): Use make_anon_name. From-SVN: r271702
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index e22a9e5..b1084f4 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -782,7 +782,7 @@ DFS::DFS_write_tree_body (struct output_block *ob,
/* Drop names that were created for anonymous entities. */
if (DECL_NAME (expr)
&& TREE_CODE (DECL_NAME (expr)) == IDENTIFIER_NODE
- && anon_aggrname_p (DECL_NAME (expr)))
+ && IDENTIFIER_ANON_P (DECL_NAME (expr)))
;
else
DFS_follow_tree_edge (DECL_NAME (expr));
@@ -1211,7 +1211,7 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map,
/* Drop names that were created for anonymous entities. */
if (DECL_NAME (t)
&& TREE_CODE (DECL_NAME (t)) == IDENTIFIER_NODE
- && anon_aggrname_p (DECL_NAME (t)))
+ && IDENTIFIER_ANON_P (DECL_NAME (t)))
;
else
visit (DECL_NAME (t));