d-demangle.c (dlang_type): Handle cent and ucent types.
authorIain Buclaw <ibuclaw@gdcproject.org>
Sat, 16 May 2015 16:50:08 +0000 (16:50 +0000)
committerIain Buclaw <ibuclaw@gcc.gnu.org>
Sat, 16 May 2015 16:50:08 +0000 (16:50 +0000)
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

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

index 609c5e85863c3164f38fc7a3c0649a537ab89f7d..110745df8948a2b9bd54c3139ea2dc909a84d04b 100644 (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
index 8104a345e1da7b019ce63bb2d911a31ae919c246..05f3a5e4b3052604a1a0543e685717b2a2917ea0 100644 (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;
index 5dd0678a01b14b6a4682111c9b973cd9535d176d..e3fd850862ec6e3cde0f99d2b5da80012d03a7f9 100644 (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))
 #