]> gcc.gnu.org Git - gcc.git/commitdiff
cplus-dem.c (demangle_prefix): Use the last __ in the mangled name when looking for...
authorAndrew MacLeod <amacleod@cygnus.com>
Fri, 13 Nov 1998 05:55:40 +0000 (05:55 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Fri, 13 Nov 1998 05:55:40 +0000 (05:55 +0000)
* 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

libiberty/ChangeLog
libiberty/cplus-dem.c

index 0e339dcb362cdd85cb2502f7c121a9a47f834375..d4a90153d4c1f38bd8399f7cf5dfb3e8832f1943 100644 (file)
@@ -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.
index 9b3c5ad71b11e9689af0058a0d5130a12fcd8fd0..5ccf92ffa7b72b886434cd3148c38ff6d9321fd6 100644 (file)
@@ -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);
            }
        }
     }
This page took 0.078303 seconds and 5 git commands to generate.