diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-13 05:55:40 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-13 05:55:40 +0000 |
commit | 75ebb412d55ec830fab5587e0c96cdf1e08c13b0 (patch) | |
tree | 70c3da0fec251833c1336f1c43e36322a1194078 /libiberty/cplus-dem.c | |
parent | 01e61a9323e53edbf92712bb719a64722d6ecf01 (diff) | |
download | gcc-75ebb412d55ec830fab5587e0c96cdf1e08c13b0.tar.gz |
* cplus-dem.c (demangle_prefix): Use the last __
in the mangled name when looking for the signature. This allows
template names to begin with __.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23627 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/cplus-dem.c')
-rw-r--r-- | libiberty/cplus-dem.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index 9b3c5ad71b1..5ccf92ffa7b 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -2005,7 +2005,15 @@ demangle_prefix (work, mangled, declp) } else { - demangle_function_name (work, mangled, declp, scan); + const char *tmp; + /* Look for the LAST occurrence of __, allowing names to have + the '__' sequence embedded in them.*/ + while ((tmp = mystrstr (scan+2, "__")) != NULL) + scan = tmp; + if (*(scan + 2) == '\0') + success = 0; + else + demangle_function_name (work, mangled, declp, scan); } } } |