]> gcc.gnu.org Git - gcc.git/commitdiff
demangle-expected: Add two tests for anonymous namespaces.
authorHans-Peter Nilsson <hp@axis.com>
Wed, 13 Sep 2000 23:09:30 +0000 (23:09 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Wed, 13 Sep 2000 23:09:30 +0000 (23:09 +0000)
* testsuite/demangle-expected: Add two tests for anonymous
namespaces.
* cplus-dem.c (gnu_special): Handle anonymous namespaces.

From-SVN: r36398

libiberty/ChangeLog
libiberty/cplus-dem.c
libiberty/testsuite/demangle-expected

index ee879c4ca8b25da3eb9c996c65ae2312c2b77d54..bb91224f4afc88fad4ef5637807aa31dc810825a 100644 (file)
@@ -1,3 +1,9 @@
+2000-09-14  Hans-Peter Nilsson  <hp@axis.com>
+
+       * testsuite/demangle-expected: Add two tests for anonymous
+       namespaces.
+       * cplus-dem.c (gnu_special): Handle anonymous namespaces.
+
 2000-09-10  Mark Mitchell  <mark@codesourcery.com>
 
        * splay-tree.c (splay_tree_predecessor): New function.
@@ -7,7 +13,6 @@
 
        * testsuite/demangle-expected: Add four tests for type_info
        mangling.
-
        * cplus-dem.c (gnu_special): Use do_type, not demangle_fund_type,
        for a non-template non-qualified type_info function or node.
 
index 79b6dc5ccf70695bb60f020ff43b6eada2141364..3fe70b4030dbcbcc0cd61589a7aee7895ebbce38 100644 (file)
@@ -2811,6 +2811,25 @@ gnu_special (work, mangled, declp)
              success = 0;
              break;
            }
+
+         if (n > 10 && strncmp (*mangled, "_GLOBAL_", 8) == 0
+             && (*mangled)[9] == 'N'
+             && (*mangled)[8] == (*mangled)[10]
+             && strchr (cplus_markers, (*mangled)[8]))
+           {
+             /* A member of the anonymous namespace.  There's information
+                about what identifier or filename it was keyed to, but
+                it's just there to make the mangled name unique; we just
+                step over it.  */
+             string_append (declp, "{anonymous}");
+             (*mangled) += n;
+
+             /* Now p points to the marker before the N, so we need to
+                update it to the first marker after what we consumed.  */
+             p = strpbrk (*mangled, cplus_markers);
+             break;
+           }
+
          string_appendn (declp, *mangled, n);
          (*mangled) += n;
        }
index fb6448cffdfad711664829a60aa941e9e674bb51..a5d72fab0fe6b9a01f896f35d3c21f010cbc68e3 100644 (file)
@@ -2558,3 +2558,11 @@ sockaddr * type_info node
 --format=gnu
 __tiPQ25libcwt16option_event_tct1Z12burst_app_ct
 libcw::option_event_tct<burst_app_ct> * type_info node
+#
+--format=gnu
+_27_GLOBAL_.N.__12burst_app_ct.app_instance
+{anonymous}::app_instance
+#
+--format=gnu
+_26_GLOBAL_\$N\$_tmp_n.iilg4Gya\$app_instance
+{anonymous}::app_instance
This page took 0.079714 seconds and 5 git commands to generate.