diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-10-11 15:33:51 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-10-11 15:33:51 +0000 |
commit | 4e7d02606ea8b0dac11887b1f759ea61d5394d86 (patch) | |
tree | d02ed206b4fdcfc4796f611f2578941e141fa903 /gcc/cp | |
parent | 64766e8dc78b92fc906e21429b1befd2b248f96e (diff) | |
download | gcc-4e7d02606ea8b0dac11887b1f759ea61d5394d86.zip gcc-4e7d02606ea8b0dac11887b1f759ea61d5394d86.tar.gz gcc-4e7d02606ea8b0dac11887b1f759ea61d5394d86.tar.bz2 |
[PATCH] DECL_ASSEMBLER_NAME and friends
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00582.html
* tree.h (DECL_ASSEMBLER_NAME_RAW): New.
(SET_DECL_ASSEMBLER_NAME): Use it.
(DECL_ASSEMBLER_NAME_SET_P): Likewise.
(COPY_DECL_ASSEMBLER_NAME): Likewise.
* tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
lto/
* lto.c (mentions_vars_p_decl_with_vis): Use
DECL_ASSEMBLER_NAME_RAW.
(lto_fixup_prevailing_decls): Likewise.
cp
* decl2.c (struct mangled_decl_hash): Use DECL_ASSEMBLER_NAME_RAW.
(record_mangling): Likewise.
From-SVN: r253647
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c0ca1f8..611742d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2017-10-11 Nathan Sidwell <nathan@acm.org> + + * decl2.c (struct mangled_decl_hash): Use DECL_ASSEMBLER_NAME_RAW. + (record_mangling): Likewise. + 2017-10-10 Nathan Sidwell <nathan@acm.org> * name-lookup.c (extern_c_fns): Rename to ... diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 3c93d5c..bc50962 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -103,7 +103,7 @@ static GTY(()) vec<tree, va_gc> *no_linkage_decls; static GTY(()) vec<tree, va_gc> *mangling_aliases; /* hash traits for declarations. Hashes single decls via - DECL_ASSEMBLER_NAME. */ + DECL_ASSEMBLER_NAME_RAW. */ struct mangled_decl_hash : ggc_remove <tree> { @@ -112,11 +112,11 @@ struct mangled_decl_hash : ggc_remove <tree> static hashval_t hash (const value_type decl) { - return IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME (decl)); + return IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME_RAW (decl)); } static bool equal (const value_type existing, compare_type candidate) { - tree name = DECL_ASSEMBLER_NAME (existing); + tree name = DECL_ASSEMBLER_NAME_RAW (existing); return candidate == name; } @@ -4399,7 +4399,7 @@ record_mangling (tree decl, bool need_warning) mangled_decls = hash_table<mangled_decl_hash>::create_ggc (499); gcc_checking_assert (DECL_ASSEMBLER_NAME_SET_P (decl)); - tree id = DECL_ASSEMBLER_NAME (decl); + tree id = DECL_ASSEMBLER_NAME_RAW (decl); tree *slot = mangled_decls->find_slot_with_hash (id, IDENTIFIER_HASH_VALUE (id), INSERT); |