d-demangle.c (dlang_identifier): Prefix mangled init symbols with `initializer for'.
authorIain Buclaw <ibuclaw@gdcproject.org>
Sat, 27 May 2017 11:30:22 +0000 (11:30 +0000)
committerIain Buclaw <ibuclaw@gcc.gnu.org>
Sat, 27 May 2017 11:30:22 +0000 (11:30 +0000)
libiberty/ChangeLog:

* d-demangle.c (dlang_identifier): Prefix mangled init symbols
with `initializer for'.
* testsuite/demangle-expected: Update tests.

From-SVN: r248539

libiberty/ChangeLog
libiberty/d-demangle.c
libiberty/testsuite/d-demangle-expected

index ba16ee5f295fe7dbe9eb4dfdf9a53801668fb7d0..45bec9963d7990a6fd7016002d3b4bc2fc063492 100644 (file)
@@ -1,3 +1,9 @@
+2017-05-27  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       * d-demangle.c (dlang_identifier): Prefix mangled init symbols
+       with `initializer for'.
+       * testsuite/demangle-expected: Update tests.
+
 2017-05-27  Iain Buclaw  <ibuclaw@gdcproject.org>
 
        * d-demangle.c (dlang_call_convention_p): Move declaration
index 829050bc0b8428be581b92c8a56096d0347930ef..08690de9bd37d508aa7c963850d910ecfd4eb321 100644 (file)
@@ -864,7 +864,8 @@ dlang_identifier (string *decl, const char *mangled,
          else if (strncmp (mangled, "__initZ", len+1) == 0)
            {
              /* The static initialiser for a given symbol.  */
-             string_append (decl, "init$");
+             string_prepend (decl, "initializer for ");
+             string_setlength (decl, string_length (decl) - 1);
              mangled += len;
              return mangled;
            }
index 7bf8b1725f980539ae9dad17f4db8ef95828ceed..547a2ddec397b44b118226275fbe46b2167eb3b1 100644 (file)
@@ -587,7 +587,7 @@ demangle.test(scope char() scope function)
 #
 --format=dlang
 _D8demangle4test6__initZ
-demangle.test.init$
+initializer for demangle.test
 #
 --format=dlang
 _D8demangle4test6__vtblZ