diff options
author | DJ Delorie <dj@redhat.com> | 2011-06-13 23:01:48 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2011-06-13 23:01:48 +0000 |
commit | ddee5e46a41c5c56e4b6a4357dd7ff8f61055f22 (patch) | |
tree | c76497eb0a5f02a5f1cc0f8a188316ab0b158dc0 /libiberty/testsuite/test-demangle.c | |
parent | 02d1f5acc508106feb8a23f7af70424d54181b52 (diff) | |
download | gdb-ddee5e46a41c5c56e4b6a4357dd7ff8f61055f22.zip gdb-ddee5e46a41c5c56e4b6a4357dd7ff8f61055f22.tar.gz gdb-ddee5e46a41c5c56e4b6a4357dd7ff8f61055f22.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/testsuite/test-demangle.c')
-rw-r--r-- | libiberty/testsuite/test-demangle.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libiberty/testsuite/test-demangle.c b/libiberty/testsuite/test-demangle.c index 1c982d6..11d9729 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) |