diff options
author | Ian Lance Taylor <ian@wasabisystems.com> | 2003-12-20 15:53:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2003-12-20 15:53:06 +0000 |
commit | 2307e075c10a30f71756ed48214891fc98b65ea4 (patch) | |
tree | e970f35297e4cc02bc84b48420d39d67eaedf34c /libiberty/cp-demangle.c | |
parent | 3101fa3c066772c23c9a71fb834753d5b07380c9 (diff) | |
download | gcc-2307e075c10a30f71756ed48214891fc98b65ea4.zip gcc-2307e075c10a30f71756ed48214891fc98b65ea4.tar.gz gcc-2307e075c10a30f71756ed48214891fc98b65ea4.tar.bz2 |
cp-demangle.c (d_identifier): In Java mode, skip an optional '$' after the identifier.
* cp-demangle.c (d_identifier): In Java mode, skip an optional '$'
after the identifier.
* testsuite/demangle-expected: Add test case.
From-SVN: r74885
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r-- | libiberty/cp-demangle.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 27e09df..1e5684c 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -1341,6 +1341,13 @@ d_identifier (di, len) name = d_str (di); d_advance (di, len); + /* A Java mangled name may have a trailing '$' if it is a C++ + keyword. This '$' is not included in the length count. We just + ignore the '$'. */ + if ((di->options & DMGL_JAVA) != 0 + && d_peek_char (di) == '$') + d_advance (di, 1); + /* Look for something which looks like a gcc encoding of an anonymous namespace, and replace it with a more user friendly name. */ |