aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@cygnus.com>1998-11-13 05:55:40 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>1998-11-13 05:55:40 +0000
commita49fb37af28600b3586a7332342bb88c53d42a98 (patch)
tree70c3da0fec251833c1336f1c43e36322a1194078 /libiberty
parente73c4a725a7cf4c9f1b7c0924d6fd1223f93cb3e (diff)
downloadgcc-a49fb37af28600b3586a7332342bb88c53d42a98.zip
gcc-a49fb37af28600b3586a7332342bb88c53d42a98.tar.gz
gcc-a49fb37af28600b3586a7332342bb88c53d42a98.tar.bz2
cplus-dem.c (demangle_prefix): Use the last __ in the mangled name when looking for the signature.
* cplus-dem.c (demangle_prefix): Use the last __ in the mangled name when looking for the signature. This allows template names to begin with __. From-SVN: r23627
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/cplus-dem.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 0e339dc..d4a9015 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+Fri Nov 13 08:51:46 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
+
+ *cplus-dem.c (demangle_prefix): Use the last "__"
+ in the mangled name when looking for the signature. This allows
+ template names to begin with "__".
+
1998-11-08 Mark Mitchell <mark@markmitchell.com>
* cplus-dem.c (type_kind_t): Add tk_reference.
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 9b3c5ad..5ccf92f 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);
}
}
}