This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Do not append " *INTERNAL* " to the decl name


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]