aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-06-13 22:32:40 +0000
committerJan Kratochvil <jkratoch@gcc.gnu.org>2011-06-13 22:32:40 +0000
commitf019462c62cdba9ffea92d81e0709cb3bcc05e70 (patch)
tree24049e95658da009e3b8bd1958b7b0ead304b317 /libiberty/cp-demangle.c
parent743a99db07908cbc7690ed1fb7c30f8d9e208a8e (diff)
downloadgcc-f019462c62cdba9ffea92d81e0709cb3bcc05e70.zip
gcc-f019462c62cdba9ffea92d81e0709cb3bcc05e70.tar.gz
gcc-f019462c62cdba9ffea92d81e0709cb3bcc05e70.tar.bz2
demangle.h (DMGL_RET_POSTFIX): Extend the comment.
include/ * demangle.h (DMGL_RET_POSTFIX): Extend the comment. (DMGL_RET_DROP): New. libiberty/ * 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. * testsuite/test-demangle.c: Document --ret-drop in a comment. (main): New variable ret_drop, fill it, call cplus_demangle with it. From-SVN: r175000
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 0ac90f1..da6d797 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -3917,10 +3917,12 @@ d_print_comp (struct d_print_info *dpi, int options,
case DEMANGLE_COMPONENT_FUNCTION_TYPE:
{
if ((options & DMGL_RET_POSTFIX) != 0)
- d_print_function_type (dpi, options, dc, dpi->modifiers);
+ d_print_function_type (dpi,
+ options & ~(DMGL_RET_POSTFIX | DMGL_RET_DROP),
+ dc, dpi->modifiers);
/* Print return type if present */
- if (d_left (dc) != NULL)
+ if (d_left (dc) != NULL && (options & DMGL_RET_DROP) == 0)
{
struct d_print_mod dpm;
@@ -3932,7 +3934,8 @@ d_print_comp (struct d_print_info *dpi, int options,
dpm.printed = 0;
dpm.templates = dpi->templates;
- d_print_comp (dpi, options, d_left (dc));
+ d_print_comp (dpi, options & ~(DMGL_RET_POSTFIX | DMGL_RET_DROP),
+ d_left (dc));
dpi->modifiers = dpm.next;
@@ -3946,7 +3949,9 @@ d_print_comp (struct d_print_info *dpi, int options,
}
if ((options & DMGL_RET_POSTFIX) == 0)
- d_print_function_type (dpi, options, dc, dpi->modifiers);
+ d_print_function_type (dpi,
+ options & ~(DMGL_RET_POSTFIX | DMGL_RET_DROP),
+ dc, dpi->modifiers);
return;
}