d-demangle.c (dlang_template_args): Skip over specialized template parameters in mangled symbol.

libiberty/ChangeLog:

2015-05-16  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-demangle.c (dlang_template_args): Skip over specialized template
	parameters in mangled symbol.
	* testsuite/d-demangle-expected: Add coverage and unittest for specialized
	template parameters.

From-SVN: r223246
This commit is contained in:
Iain Buclaw 2015-05-16 16:50:19 +00:00 committed by Iain Buclaw
parent 59251a7367
commit ed4cdb8502
3 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_template_args): Skip over specialized template
parameters in mangled symbol.
* testsuite/d-demangle-expected: Add coverage and unittest for specialized
template parameters.
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_type): Handle cent and ucent types.

View File

@ -1383,6 +1383,10 @@ dlang_template_args (string *decl, const char *mangled)
if (n++)
string_append (decl, ", ");
/* Skip over specialised template prefix. */
if (*mangled == 'H')
mangled++;
switch (*mangled)
{
case 'S': /* Symbol parameter. */

View File

@ -630,6 +630,10 @@ _D8demangle19__T4testS6symbolTaZv
demangle.test!(symbol, char)
#
--format=dlang
_D8demangle12__T4testHTaZv
demangle.test!(char)
#
--format=dlang
_D8demangle13__T4testVPinZv
demangle.test!(null)
#
@ -1050,3 +1054,7 @@ test.main().local()
--format=dlang
_D3std6socket12InternetHost221__T13getHostNoSyncVAyaa96_0a09202020206175746f2078203d2068746f6e6c28706172616d293b0a09202020206175746f206865203d20676574686f73746279616464722826782c20342c206361737428696e74294164647265737346616d696c792e494e4554293b0a09TkZ13getHostNoSyncMFkZb
std.socket.InternetHost.getHostNoSync!("\n\t auto x = htonl(param);\n\t auto he = gethostbyaddr(&x, 4, cast(int)AddressFamily.INET);\n\t", uint).getHostNoSync(uint)
#
--format=dlang
_D2gc6config13__T5parseHTfZ5parseFNbNiAxaKAxaKfZb
gc.config.parse!(float).parse(const(char)[], ref const(char)[], ref float)