[PATCH] New lang hook
authorNathan Sidwell <nathan@acm.org>
Thu, 16 Nov 2017 14:54:54 +0000 (14:54 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 16 Nov 2017 14:54:54 +0000 (14:54 +0000)
commit5f3682ffcef162363b783eb9ee702debff489fa8
treeb9e4f1042a3c4558c07ba463d34ee29d68c28a6e
parenta930324dabd41a76ef141a85a7d0cc7fc9c9c0b3
[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
12 files changed:
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.h
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/langhooks-def.h
gcc/langhooks.c
gcc/langhooks.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr82836.C [new file with mode: 0644]
gcc/tree.c
gcc/tree.h