diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-06-13 22:32:40 +0000 |
---|---|---|
committer | Jan Kratochvil <jkratoch@gcc.gnu.org> | 2011-06-13 22:32:40 +0000 |
commit | f019462c62cdba9ffea92d81e0709cb3bcc05e70 (patch) | |
tree | 24049e95658da009e3b8bd1958b7b0ead304b317 /libiberty/cp-demangle.c | |
parent | 743a99db07908cbc7690ed1fb7c30f8d9e208a8e (diff) | |
download | gcc-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.c | 13 |
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; } |