From dc64856fdf1205f21865ab523cbb1a0bea4e8f20 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sat, 27 May 2017 11:30:22 +0000 Subject: [PATCH] d-demangle.c (dlang_identifier): Prefix mangled init symbols with `initializer for'. libiberty/ChangeLog: * d-demangle.c (dlang_identifier): Prefix mangled init symbols with `initializer for'. * testsuite/demangle-expected: Update tests. From-SVN: r248539 --- libiberty/ChangeLog | 6 ++++++ libiberty/d-demangle.c | 3 ++- libiberty/testsuite/d-demangle-expected | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index ba16ee5f295..45bec9963d7 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2017-05-27 Iain Buclaw + + * d-demangle.c (dlang_identifier): Prefix mangled init symbols + with `initializer for'. + * testsuite/demangle-expected: Update tests. + 2017-05-27 Iain Buclaw * d-demangle.c (dlang_call_convention_p): Move declaration diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index 829050bc0b8..08690de9bd3 100644 --- a/libiberty/d-demangle.c +++ b/libiberty/d-demangle.c @@ -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; } diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected index 7bf8b1725f9..547a2ddec39 100644 --- a/libiberty/testsuite/d-demangle-expected +++ b/libiberty/testsuite/d-demangle-expected @@ -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 -- 2.30.2