]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cplus-dem.c (demangle_prefix): Use the last "__" in the mangled name when looking...
authorAndrew MacLeod <amacleod@cygnus.com>
Mon, 23 Nov 1998 08:52:34 +0000 (08:52 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 23 Nov 1998 08:52:34 +0000 (01:52 -0700)
Mon Nov 23 09:49:49 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 "__".

From-SVN: r23779

libiberty/ChangeLog
libiberty/cplus-dem.c

index a80475bc9e6d2dc1eb9bf89b7b89a2206001fe32..86c45e53e6fa2b3a702a95cacbb42dd762722772 100644 (file)
@@ -1,3 +1,9 @@
+Mon Nov 23 09:49:49 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 "__".
+
 Mon Nov 23 09:44:26 1998  Richard Henderson <rth@cygnus.com>
 
        * config.table: Append mh-ppcpic and mh-elfalphapic 
index c5d76a73e5060318ffa16332d1be73aea22be21f..1a3ec90ec4003fb4e2a7246b248a66c5c317c290 100644 (file)
@@ -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);
            }
        }
     }