]> 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:24 +0000 (08:52 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 23 Nov 1998 08:52:24 +0000 (01:52 -0700)

        *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: r23778

gcc/ChangeLog
gcc/cplus-dem.c

index 2df69a155c46ecaa62f4fb175077231cc5ab9a74..442382158ce5c9048418a1e341ce6fdb27833be1 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:40:41 1998  David Edelsohn  <edelsohn@mhpcc.edu>
 
        * rs6000.h (LEGITIMIZE_ADDRESS): Add missing "goto WIN".
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);
            }
        }
     }