summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorjkratoch <jkratoch@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-13 22:34:19 +0000
committerjkratoch <jkratoch@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-13 22:34:19 +0000
commitbe03abe8c7dc65fca956fec4507b11f0184ac547 (patch)
tree58e4b1a3d20615fe8e402f9ff37465ba7876cd3c /libiberty
parent932501f94a46dbc8dc4a6bf3ceb7eaa1640181f2 (diff)
downloadgcc-be03abe8c7dc65fca956fec4507b11f0184ac547.tar.gz
libiberty/
* cp-demangle.c (d_print_comp) <DEMANGLE_COMPONENT_FUNCTION_TYPE>: Suppress d_print_mod for DMGL_RET_POSTFIX. * testsuite/demangle-expected: New testcases for --ret-postfix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/cp-demangle.c5
-rw-r--r--libiberty/testsuite/demangle-expected9
3 files changed, 19 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 8e1fa521db6..0b8977c4e17 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,5 +1,11 @@
2011-06-13 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * cp-demangle.c (d_print_comp) <DEMANGLE_COMPONENT_FUNCTION_TYPE>:
+ Suppress d_print_mod for DMGL_RET_POSTFIX.
+ * testsuite/demangle-expected: New testcases for --ret-postfix.
+
+2011-06-13 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* cp-demangle.c (d_print_comp) <DEMANGLE_COMPONENT_FUNCTION_TYPE>: Do
not pass DMGL_RET_POSTFIX or DMGL_RET_DROP. Support DMGL_RET_DROP.
* testsuite/demangle-expected: New testcases for --ret-drop.
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index da6d7979f2c..3fc52660153 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -3922,7 +3922,10 @@ d_print_comp (struct d_print_info *dpi, int options,
dc, dpi->modifiers);
/* Print return type if present */
- if (d_left (dc) != NULL && (options & DMGL_RET_DROP) == 0)
+ if (d_left (dc) != NULL && (options & DMGL_RET_POSTFIX) != 0)
+ d_print_comp (dpi, options & ~(DMGL_RET_POSTFIX | DMGL_RET_DROP),
+ d_left (dc));
+ else if (d_left (dc) != NULL && (options & DMGL_RET_DROP) == 0)
{
struct d_print_mod dpm;
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 63a3e24ba41..c94eb3c00f5 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -3968,6 +3968,15 @@ outer(short (*)(int), long)
--format=gnu-v3
_Z6outer2IsEPFilES1_
int (*outer2<short>(int (*)(long)))(long)
+--format=gnu-v3 --ret-postfix
+_Z5outerIsEcPFilE
+outer<short>(int (*)(long))char
+--format=gnu-v3 --ret-postfix
+_Z5outerPFsiEl
+outer(short (*)(int), long)
+--format=gnu-v3 --ret-postfix
+_Z6outer2IsEPFilES1_
+outer2<short>(int (*)(long))int (*)(long)
--format=gnu-v3 --ret-drop
_Z5outerIsEcPFilE
outer<short>(int (*)(long))