[PATCH] Commonize anon-name generation
authorNathan Sidwell <nathan@acm.org>
Tue, 28 May 2019 13:31:16 +0000 (13:31 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 28 May 2019 13:31:16 +0000 (13:31 +0000)
commit7daef9aceb80787d9fd64b4e110b175b4d9e5a9e
treee8ff7e7170740fbcd3cf83d7662f6be7b2bf2ee0
parent3253d4f0266fb7aa4e70cf6afcfac9b690cfed4a
[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
15 files changed:
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-lang.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/error.c
gcc/cp/name-lookup.c
gcc/cp/pt.c
gcc/d/ChangeLog
gcc/d/types.cc
gcc/lto-streamer-out.c
gcc/tree-streamer-out.c
gcc/tree.c
gcc/tree.h