diff options
author | jkratoch <jkratoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-13 22:32:40 +0000 |
---|---|---|
committer | jkratoch <jkratoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-13 22:32:40 +0000 |
commit | 932501f94a46dbc8dc4a6bf3ceb7eaa1640181f2 (patch) | |
tree | 24049e95658da009e3b8bd1958b7b0ead304b317 /libiberty/testsuite | |
parent | ce673d9a757460240add1503c73e87d61738f872 (diff) | |
download | gcc-932501f94a46dbc8dc4a6bf3ceb7eaa1640181f2.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175000 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/testsuite')
-rw-r--r-- | libiberty/testsuite/demangle-expected | 18 | ||||
-rw-r--r-- | libiberty/testsuite/test-demangle.c | 12 |
2 files changed, 26 insertions, 4 deletions
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 5ce0377b13b..63a3e24ba41 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -3959,6 +3959,24 @@ f(decltype(nullptr)) --format=gnu-v3 _ZN5aaaaa6bbbbbb5cccccIN23ddddddddddddddddddddddd3eeeENS2_4ffff16ggggggggggggggggENS0_9hhhhhhhhhES6_S6_S6_S6_S6_S6_S6_EE aaaaa::bbbbbb::ccccc<ddddddddddddddddddddddd::eee, ddddddddddddddddddddddd::ffff::gggggggggggggggg, aaaaa::bbbbbb::hhhhhhhhh, aaaaa::bbbbbb::hhhhhhhhh, aaaaa::bbbbbb::hhhhhhhhh, aaaaa::bbbbbb::hhhhhhhhh, aaaaa::bbbbbb::hhhhhhhhh, aaaaa::bbbbbb::hhhhhhhhh, aaaaa::bbbbbb::hhhhhhhhh, aaaaa::bbbbbb::hhhhhhhhh> +--format=gnu-v3 +_Z5outerIsEcPFilE +char outer<short>(int (*)(long)) +--format=gnu-v3 +_Z5outerPFsiEl +outer(short (*)(int), long) +--format=gnu-v3 +_Z6outer2IsEPFilES1_ +int (*outer2<short>(int (*)(long)))(long) +--format=gnu-v3 --ret-drop +_Z5outerIsEcPFilE +outer<short>(int (*)(long)) +--format=gnu-v3 --ret-drop +_Z5outerPFsiEl +outer(short (*)(int), long) +--format=gnu-v3 --ret-drop +_Z6outer2IsEPFilES1_ +outer2<short>(int (*)(long)) # # Ada (GNAT) tests. # diff --git a/libiberty/testsuite/test-demangle.c b/libiberty/testsuite/test-demangle.c index 1c982d6ef20..11d9729999b 100644 --- a/libiberty/testsuite/test-demangle.c +++ b/libiberty/testsuite/test-demangle.c @@ -159,6 +159,7 @@ exp: %s\n", output is an integer representing ctor_kind. --is-v3-dtor Likewise, but for dtors. --ret-postfix Passes the DMGL_RET_POSTFIX option + --ret-drop Passes the DMGL_RET_DROP option For compatibility, just in case it matters, the options line may be empty, to mean --format=auto. If it doesn't start with --, then it @@ -174,7 +175,7 @@ main(argc, argv) int no_params; int is_v3_ctor; int is_v3_dtor; - int ret_postfix; + int ret_postfix, ret_drop; struct line format; struct line input; struct line expect; @@ -209,6 +210,7 @@ main(argc, argv) no_params = 0; ret_postfix = 0; + ret_drop = 0; is_v3_ctor = 0; is_v3_dtor = 0; if (format.data[0] == '\0') @@ -265,6 +267,8 @@ main(argc, argv) is_v3_dtor = 1; else if (strcmp (opt, "--ret-postfix") == 0) ret_postfix = 1; + else if (strcmp (opt, "--ret-drop") == 0) + ret_drop = 1; else { printf ("FAIL at line %d: unrecognized option %s\n", @@ -307,9 +311,9 @@ main(argc, argv) cplus_demangle_set_style (style); - result = cplus_demangle (inp, - DMGL_PARAMS|DMGL_ANSI|DMGL_TYPES - |(ret_postfix ? DMGL_RET_POSTFIX : 0)); + result = cplus_demangle (inp, (DMGL_PARAMS | DMGL_ANSI | DMGL_TYPES + | (ret_postfix ? DMGL_RET_POSTFIX : 0) + | (ret_drop ? DMGL_RET_DROP : 0))); if (result ? strcmp (result, expect.data) |