OSDN Git Service

gcc/cp/
authoraaw <aaw@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Aug 2007 10:21:13 +0000 (10:21 +0000)
committeraaw <aaw@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Aug 2007 10:21:13 +0000 (10:21 +0000)
* name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
* name-lookup.h (cp_binding_level): Remove vtables member.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127765 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/cp/name-lookup.h

index 5bc2266..33a207e 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-24  Ollie Wild  <aaw@google.com>
+
+       * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
+       * name-lookup.h (cp_binding_level): Remove vtables member.
+
 2007-08-24  Richard Guenther  <rguenther@suse.de>
 
        * tree.c (cp_cannot_inline_tree_fn): Remove.
index c6628aa..5b5e99d 100644 (file)
@@ -536,17 +536,16 @@ supplement_binding (cxx_binding *binding, tree decl)
 static void
 add_decl_to_level (tree decl, cxx_scope *b)
 {
+  /* We used to record virtual tables as if they were ordinary
+     variables, but no longer do so.  */
+  gcc_assert (!(TREE_CODE (decl) == VAR_DECL && DECL_VIRTUAL_P (decl)));
+
   if (TREE_CODE (decl) == NAMESPACE_DECL
       && !DECL_NAMESPACE_ALIAS (decl))
     {
       TREE_CHAIN (decl) = b->namespaces;
       b->namespaces = decl;
     }
-  else if (TREE_CODE (decl) == VAR_DECL && DECL_VIRTUAL_P (decl))
-    {
-      TREE_CHAIN (decl) = b->vtables;
-      b->vtables = decl;
-    }
   else
     {
       /* We build up the list in reverse order, and reverse it later if
index d82445f..88551f2 100644 (file)
@@ -190,9 +190,6 @@ struct cp_binding_level GTY(())
     /* An array of static functions and variables (for namespaces only) */
     VEC(tree,gc) *static_decls;
 
-    /* A chain of VTABLE_DECL nodes.  */
-    tree vtables;
-
     /* A list of USING_DECL nodes.  */
     tree usings;