d-demangle.c (dlang_type): Handle cent and ucent types.

libiberty/ChangeLog:

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

	* d-demangle.c (dlang_type): Handle cent and ucent types.
	* testsuite/d-demangle-expected: Add coverage tests for cent and ucent.

From-SVN: r223245
This commit is contained in:
Iain Buclaw 2015-05-16 16:50:08 +00:00 committed by Iain Buclaw
parent 7ce4461f37
commit 59251a7367
3 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_type): Handle cent and ucent types.
* testsuite/d-demangle-expected: Add coverage tests for cent and ucent.
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_attributes): Handle return attributes, ignoring

View File

@ -653,6 +653,20 @@ dlang_type (string *decl, const char *mangled)
mangled++;
string_append (decl, "dchar");
return mangled;
case 'z':
mangled++;
switch (*mangled)
{
case 'i':
mangled++;
string_append (decl, "cent");
return mangled;
case 'k':
mangled++;
string_append (decl, "ucent");
return mangled;
}
return NULL;
default: /* unhandled */
return NULL;

View File

@ -114,6 +114,14 @@ _D8demangle4testFwZv
demangle.test(dchar)
#
--format=dlang
_D8demangle4testFziZv
demangle.test(cent)
#
--format=dlang
_D8demangle4testFzkZv
demangle.test(ucent)
#
--format=dlang
_D8demangle4testFOaZv
demangle.test(shared(char))
#