Commit dc64856f by Iain Buclaw Committed by Iain Buclaw

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
parent 0e3712f6
2017-05-27 Iain Buclaw <ibuclaw@gdcproject.org> 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 * d-demangle.c (dlang_call_convention_p): Move declaration
before dlang_type. before dlang_type.
(dlang_type): Handle function types. (dlang_type): Handle function types.
......
...@@ -864,7 +864,8 @@ dlang_identifier (string *decl, const char *mangled, ...@@ -864,7 +864,8 @@ dlang_identifier (string *decl, const char *mangled,
else if (strncmp (mangled, "__initZ", len+1) == 0) else if (strncmp (mangled, "__initZ", len+1) == 0)
{ {
/* The static initialiser for a given symbol. */ /* 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; mangled += len;
return mangled; return mangled;
} }
......
...@@ -587,7 +587,7 @@ demangle.test(scope char() scope function) ...@@ -587,7 +587,7 @@ demangle.test(scope char() scope function)
# #
--format=dlang --format=dlang
_D8demangle4test6__initZ _D8demangle4test6__initZ
demangle.test.init$ initializer for demangle.test
# #
--format=dlang --format=dlang
_D8demangle4test6__vtblZ _D8demangle4test6__vtblZ
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment