From: Andrew MacLeod Date: Mon, 23 Nov 1998 08:52:34 +0000 (+0000) Subject: cplus-dem.c (demangle_prefix): Use the last "__" in the mangled name when looking... X-Git-Tag: prereleases/egcs-1.1.1-prerelease-3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=644044800678f6e11f968b7c4c9fd3b8c15d2c9e;p=thirdparty%2Fgcc.git cplus-dem.c (demangle_prefix): Use the last "__" in the mangled name when looking for the signature. Mon Nov 23 09:49:49 1998 Andrew MacLeod *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: r23779 --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index a80475bc9e6d..86c45e53e6fa 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 23 09:49:49 1998 Andrew MacLeod + + *cplus-dem.c (demangle_prefix): Use the last "__" + in the mangled name when looking for the signature. This allows + template names to begin with "__". + Mon Nov 23 09:44:26 1998 Richard Henderson * config.table: Append mh-ppcpic and mh-elfalphapic diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index c5d76a73e506..1a3ec90ec400 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -1923,7 +1923,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); } } }