class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 18 Jun 2009 18:09:12 +0000 (18:09 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Thu, 18 Jun 2009 18:09:12 +0000 (18:09 +0000)
        * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
        * decl.c (finish_decl): Remove.
        (declare_global_var): Replace finish_decl with cp_finish_decl.
        (start_method): Same.
        * rtti.c (emit_tinfo_decl): Same.
        * pt.c (tsubst_expr): Same.
        (instantiate_decl): Same.
        * decl2.c (grokbitfield): Same.
        * name-lookup.c (pushdecl_top_level_1): Same.
        * cp-tree.h: Remove finish_decl.

From-SVN: r148666

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/name-lookup.c
gcc/cp/pt.c
gcc/cp/rtti.c

index 62f93a98526b88680492e233a581f0f7c14d5df5..8f9d6d80669b0dac9da78e290bfa4d7480e90a9a 100644 (file)
@@ -1,3 +1,16 @@
+2009-06-18  Aldy Hernandez  <aldyh@redhat.com>
+
+       * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
+       * decl.c (finish_decl): Remove.
+       (declare_global_var): Replace finish_decl with cp_finish_decl.
+       (start_method): Same.
+       * rtti.c (emit_tinfo_decl): Same.
+       * pt.c (tsubst_expr): Same.
+       (instantiate_decl): Same.
+       * decl2.c (grokbitfield): Same.
+       * name-lookup.c (pushdecl_top_level_1): Same.
+       * cp-tree.h: Remove finish_decl.
+
 2009-06-16  David Edelsohn  <edelsohn@gnu.org>
 
        * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
index b762019cf8374032b7c4b15accae1077237f6e6d..d86ff646429945edc105c60fb30fa39bcc3e3908 100644 (file)
@@ -774,7 +774,7 @@ get_vtable_decl (tree type, int complete)
   if (complete)
     {
       DECL_EXTERNAL (decl) = 1;
-      finish_decl (decl, NULL_TREE, NULL_TREE, NULL_TREE);
+      cp_finish_decl (decl, NULL_TREE, false, NULL_TREE, 0);
     }
 
   return decl;
index 8c45b8a3a6854b51f0df6038765becf485436a4c..c49a877861774f90dbf3b4bda6f5b35ba691a1a4 100644 (file)
@@ -4333,7 +4333,6 @@ extern tree start_decl                            (const cp_declarator *, cp_decl_specifier_seq *, int,
 extern void start_decl_1                       (tree, bool);
 extern bool check_array_initializer            (tree, tree, tree);
 extern void cp_finish_decl                     (tree, tree, bool, tree, int);
-extern void finish_decl                                (tree, tree, tree, tree);
 extern int cp_complete_array_type              (tree *, tree, bool);
 extern tree build_ptrmemfunc_type              (tree);
 extern tree build_ptrmem_type                  (tree, tree);
index 296d1438515d1a1e3ac5e9f522fa054130e00b3e..9ebfd27d9ca1ef80b7da888481ad34a471446cb9 100644 (file)
@@ -5880,15 +5880,6 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
     mark_decl_referenced (decl);
 }
 
-/* This is here for a midend callback from c-common.c.  */
-
-void
-finish_decl (tree decl, tree init, tree origtype ATTRIBUTE_UNUSED,
-            tree asmspec_tree)
-{
-  cp_finish_decl (decl, init, /*init_const_expr_p=*/false, asmspec_tree, 0);
-}
-
 /* Returns a declaration for a VAR_DECL as if:
 
      extern "C" TYPE NAME;
@@ -5911,7 +5902,7 @@ declare_global_var (tree name, tree type)
      library), then it is possible that our declaration will be merged
      with theirs by pushdecl.  */
   decl = pushdecl (decl);
-  finish_decl (decl, NULL_TREE, NULL_TREE, NULL_TREE);
+  cp_finish_decl (decl, NULL_TREE, false, NULL_TREE, 0);
   pop_from_top_level ();
 
   return decl;
@@ -12523,7 +12514,7 @@ start_method (cp_decl_specifier_seq *declspecs,
        }
     }
 
-  finish_decl (fndecl, NULL_TREE, NULL_TREE, NULL_TREE);
+  cp_finish_decl (fndecl, NULL_TREE, false, NULL_TREE, 0);
 
   /* Make a place for the parms.  */
   begin_scope (sk_function_parms, fndecl);
index 308f767cc096a1b85b16692a4244ca51a6e55ae8..119196408e8764534cbb4dbf02dcd8271b6b30de 100644 (file)
@@ -1002,7 +1002,7 @@ grokbitfield (const cp_declarator *declarator,
       error ("static member %qD cannot be a bit-field", value);
       return NULL_TREE;
     }
-  finish_decl (value, NULL_TREE, NULL_TREE, NULL_TREE);
+  cp_finish_decl (value, NULL_TREE, false, NULL_TREE, 0);
 
   if (width != error_mark_node)
     {
index 143fcf3156882172ef556e18c2f13d0f882473f9..69ee8bfea39086626847638aaf8ffe3bc9eed5e4 100644 (file)
@@ -3555,7 +3555,7 @@ pushdecl_top_level_1 (tree x, tree *init, bool is_friend)
   push_to_top_level ();
   x = pushdecl_namespace_level (x, is_friend);
   if (init)
-    finish_decl (x, *init, NULL_TREE, NULL_TREE);
+    cp_finish_decl (x, *init, false, NULL_TREE, 0);
   pop_from_top_level ();
   POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, x);
 }
index 5645b23e27f6f0bc23e785a6fbafcc585bbf446c..977a10118714c84a3441ef9d31796f7bbba19516 100644 (file)
@@ -10819,7 +10819,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
                          init = t;
                      }
 
-                   finish_decl (decl, init, NULL_TREE, NULL_TREE);
+                   cp_finish_decl (decl, init, false, NULL_TREE, 0);
                  }
              }
          }
@@ -15727,7 +15727,7 @@ instantiate_decl (tree d, int defer_ok,
 
       /* The initializer is placed in DECL_INITIAL by
         regenerate_decl_from_template.  Pull it out so that
-        finish_decl can process it.  */
+        cp_finish_decl can process it.  */
       init = DECL_INITIAL (d);
       DECL_INITIAL (d) = NULL_TREE;
       DECL_INITIALIZED_P (d) = 0;
@@ -15739,7 +15739,7 @@ instantiate_decl (tree d, int defer_ok,
 
       /* Enter the scope of D so that access-checking works correctly.  */
       push_nested_class (DECL_CONTEXT (d));
-      finish_decl (d, init, NULL_TREE, NULL_TREE);
+      cp_finish_decl (d, init, false, NULL_TREE, 0);
       pop_nested_class ();
     }
   else if (TREE_CODE (d) == FUNCTION_DECL)
index c26caa9cb3dcdcc4e303b4a0c59d2c2bf50691a8..c78d92be09b195fb5f970113460b98dc8d41fc38 100644 (file)
@@ -1532,7 +1532,7 @@ emit_tinfo_decl (tree decl)
       init = get_pseudo_ti_init (type, get_pseudo_ti_index (type));
       DECL_INITIAL (decl) = init;
       mark_used (decl);
-      finish_decl (decl, init, NULL_TREE, NULL_TREE);
+      cp_finish_decl (decl, init, false, NULL_TREE, 0);
       return true;
     }
   else