From 7f78414b49b493be11c50abba0e278296143efa9 Mon Sep 17 00:00:00 2001 From: aldyh Date: Thu, 18 Jun 2009 18:09:12 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148666 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 13 +++++++++++++ gcc/cp/class.c | 2 +- gcc/cp/cp-tree.h | 1 - gcc/cp/decl.c | 13 ++----------- gcc/cp/decl2.c | 2 +- gcc/cp/name-lookup.c | 2 +- gcc/cp/pt.c | 6 +++--- gcc/cp/rtti.c | 2 +- 8 files changed, 22 insertions(+), 19 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 62f93a9..8f9d6d8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,16 @@ +2009-06-18 Aldy Hernandez + + * 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 * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b762019..d86ff64 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -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; diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 8c45b8a..c49a877 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 296d143..9ebfd27 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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); diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 308f767..1191964 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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) { diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 143fcf3..69ee8bf 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -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); } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 5645b23..977a101 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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) diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index c26caa9..c78d92b 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -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 -- 2.7.4