diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-11-16 14:54:54 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-11-16 14:54:54 +0000 |
commit | 5f3682ffcef162363b783eb9ee702debff489fa8 (patch) | |
tree | b9e4f1042a3c4558c07ba463d34ee29d68c28a6e /gcc/langhooks.h | |
parent | a930324dabd41a76ef141a85a7d0cc7fc9c9c0b3 (diff) | |
download | gcc-5f3682ffcef162363b783eb9ee702debff489fa8.zip gcc-5f3682ffcef162363b783eb9ee702debff489fa8.tar.gz gcc-5f3682ffcef162363b783eb9ee702debff489fa8.tar.bz2 |
[PATCH] New lang hook
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01340.html
PR c++/82836
PR c++/82737
* tree.h (COPY_DECL_RTL): Rename parms for clarity.
(SET_DECL_ASSEMBLER_NAME): Forward to
overwrite_decl_assembler_name.
(COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
(overwrite_decl_assembler_name): Declare.
* tree.c (overwrite_decl_assembler_name): New.
* langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
(LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
(LANG_HOOKS_INITIALIZER): Add it.
* langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
* langhooks.c (lhd_set_decl_assembler_name): Use
SET_DECL_ASSEMBLER_NAME.
(lhd_overwrite_decl_assembler_name): Default implementation.
PR c++/82836
PR c++/82737
* cp-objcp-common.h (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME):
Override.
* cp-tree.h (overwrite_mangling): Declare.
* decl2.c (struct mangled_decl_hash): Entries are deletable.
(overwrite_mangling): New.
PR c++/82836
PR c++/82737
* g++.dg/pr82836.C: New.
From-SVN: r254823
Diffstat (limited to 'gcc/langhooks.h')
-rw-r--r-- | gcc/langhooks.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/langhooks.h b/gcc/langhooks.h index d1288f1..afc879f 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -395,6 +395,10 @@ struct lang_hooks assembler does not talk about it. */ void (*set_decl_assembler_name) (tree); + /* Overwrite the DECL_ASSEMBLER_NAME for a node. The name is being + changed (including to or from NULL_TREE). */ + void (*overwrite_decl_assembler_name) (tree, tree); + /* The front end can add its own statistics to -fmem-report with this hook. It should output to stderr. */ void (*print_statistics) (void); |