This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 7/7] [D] libiberty: Add support for cent and ucent types
- From: Iain Buclaw <ibuclaw at gdcproject dot org>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <iant at google dot com>
- Date: Wed, 13 May 2015 10:51:44 +0200
- Subject: [PATCH 7/7] [D] libiberty: Add support for cent and ucent types
- Authentication-results: sourceware.org; auth=none
The next version of D adds support for cent and ucent for platforms
that are able to handle them natively. This adds support for
demangling them.
---
libiberty/ChangeLog:
2015-05-13 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 7fe0bf5d0b218f18cba3097be8c166e9934091eb Mon Sep 17 00:00:00 2001
From: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Mon, 11 May 2015 22:21:13 +0200
Subject: [PATCH 7/7] D demangle: Add support for cent and ucent types
---
libiberty/d-demangle.c | 14 ++++++++++++++
libiberty/testsuite/d-demangle-expected | 8 ++++++++
2 files changed, 22 insertions(+)
diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c
index a7821d8..5c0f356 100644
--- a/libiberty/d-demangle.c
+++ b/libiberty/d-demangle.c
@@ -669,6 +669,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;
diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected
index d88fb26..580da9b 100644
--- a/libiberty/testsuite/d-demangle-expected
+++ b/libiberty/testsuite/d-demangle-expected
@@ -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))
#
--
2.1.0