This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do not append " *INTERNAL* " to the decl name
- From: Dehao Chen <dehao at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Cary Coutant <ccoutant at google dot com>, Jason Merrill <jason at redhat dot com>, mark at codesourcery dot com, nathan at codesourcery dot com
- Date: Thu, 10 Oct 2013 09:08:30 -0700
- Subject: Re: [PATCH] Do not append " *INTERNAL* " to the decl name
- Authentication-results: sourceware.org; auth=none
- References: <CAO2gOZV=qW=PeEZjp37NFVHMAMwbXaCX-58Oyj=SH0B6+3izmQ at mail dot gmail dot com>
ping^2
Thanks,
Dehao
On Tue, Oct 1, 2013 at 1:28 PM, Dehao Chen <dehao@google.com> wrote:
> Hi,
>
> This patch disables the C++ frontend to add " *INTERNAL* " suffix to
> maybe_in_charge_destructor/constructor. This is needed because these
> functions could be emitted in the debug info, and we would want to
> demangle these names.
>
> Bootstrapped and passed all regression tests.
>
> OK for trunk?
>
> Thanks,
> Dehao
>
> gcc/ChangeLog:
>
> 2013-10-01 Dehao Chen <dehao@google.com>
>
> * cp/mangle.c (write_special_name_constructor): Remove the
> INTERNAL suffix.
>
> Index: gcc/cp/mangle.c
> ===================================================================
> --- gcc/cp/mangle.c (revision 202991)
> +++ gcc/cp/mangle.c (working copy)
> @@ -687,13 +687,6 @@ write_mangled_name (const tree decl, bool top_leve
> mangled_name:;
> write_string ("_Z");
> write_encoding (decl);
> - if (DECL_LANG_SPECIFIC (decl)
> - && (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl)
> - || DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)))
> - /* We need a distinct mangled name for these entities, but
> - we should never actually output it. So, we append some
> - characters the assembler won't like. */
> - write_string (" *INTERNAL* ");
> }
> }
>
> @@ -1654,8 +1647,7 @@ write_identifier (const char *identifier)
> Currently, allocating constructors are never used.
>
> We also need to provide mangled names for the maybe-in-charge
> - constructor, so we treat it here too. mangle_decl_string will
> - append *INTERNAL* to that, to make sure we never emit it. */
> + constructor, so we treat it here too. */
>
> static void
> write_special_name_constructor (const tree ctor)
> @@ -1682,8 +1674,7 @@ write_special_name_constructor (const tree ctor)
> ::= D2 # base object (not-in-charge) destructor
>
> We also need to provide mangled names for the maybe-incharge
> - destructor, so we treat it here too. mangle_decl_string will
> - append *INTERNAL* to that, to make sure we never emit it. */
> + destructor, so we treat it here too. */
>
> static void
> write_special_name_destructor (const tree dtor)