class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.

* 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
This commit is contained in:
Aldy Hernandez 2009-06-18 18:09:12 +00:00 committed by Aldy Hernandez
parent b6680d7271
commit 3600f67820
8 changed files with 22 additions and 19 deletions

View 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> 2009-06-16 David Edelsohn <edelsohn@gnu.org>
* g++-spec.c (LIBSTDCXX_STATIC): Default to NULL. * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.

View File

@ -774,7 +774,7 @@ get_vtable_decl (tree type, int complete)
if (complete) if (complete)
{ {
DECL_EXTERNAL (decl) = 1; 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; return decl;

View 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 void start_decl_1 (tree, bool);
extern bool check_array_initializer (tree, tree, tree); extern bool check_array_initializer (tree, tree, tree);
extern void cp_finish_decl (tree, tree, bool, tree, int); 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 int cp_complete_array_type (tree *, tree, bool);
extern tree build_ptrmemfunc_type (tree); extern tree build_ptrmemfunc_type (tree);
extern tree build_ptrmem_type (tree, tree); extern tree build_ptrmem_type (tree, tree);

View File

@ -5880,15 +5880,6 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
mark_decl_referenced (decl); 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: /* Returns a declaration for a VAR_DECL as if:
extern "C" TYPE NAME; 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 library), then it is possible that our declaration will be merged
with theirs by pushdecl. */ with theirs by pushdecl. */
decl = pushdecl (decl); 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 (); pop_from_top_level ();
return decl; 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. */ /* Make a place for the parms. */
begin_scope (sk_function_parms, fndecl); begin_scope (sk_function_parms, fndecl);

View File

@ -1002,7 +1002,7 @@ grokbitfield (const cp_declarator *declarator,
error ("static member %qD cannot be a bit-field", value); error ("static member %qD cannot be a bit-field", value);
return NULL_TREE; 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) if (width != error_mark_node)
{ {

View File

@ -3555,7 +3555,7 @@ pushdecl_top_level_1 (tree x, tree *init, bool is_friend)
push_to_top_level (); push_to_top_level ();
x = pushdecl_namespace_level (x, is_friend); x = pushdecl_namespace_level (x, is_friend);
if (init) if (init)
finish_decl (x, *init, NULL_TREE, NULL_TREE); cp_finish_decl (x, *init, false, NULL_TREE, 0);
pop_from_top_level (); pop_from_top_level ();
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, x); POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, x);
} }

View File

@ -10819,7 +10819,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
init = t; 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 /* The initializer is placed in DECL_INITIAL by
regenerate_decl_from_template. Pull it out so that regenerate_decl_from_template. Pull it out so that
finish_decl can process it. */ cp_finish_decl can process it. */
init = DECL_INITIAL (d); init = DECL_INITIAL (d);
DECL_INITIAL (d) = NULL_TREE; DECL_INITIAL (d) = NULL_TREE;
DECL_INITIALIZED_P (d) = 0; 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. */ /* Enter the scope of D so that access-checking works correctly. */
push_nested_class (DECL_CONTEXT (d)); 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 (); pop_nested_class ();
} }
else if (TREE_CODE (d) == FUNCTION_DECL) else if (TREE_CODE (d) == FUNCTION_DECL)

View File

@ -1532,7 +1532,7 @@ emit_tinfo_decl (tree decl)
init = get_pseudo_ti_init (type, get_pseudo_ti_index (type)); init = get_pseudo_ti_init (type, get_pseudo_ti_index (type));
DECL_INITIAL (decl) = init; DECL_INITIAL (decl) = init;
mark_used (decl); mark_used (decl);
finish_decl (decl, init, NULL_TREE, NULL_TREE); cp_finish_decl (decl, init, false, NULL_TREE, 0);
return true; return true;
} }
else else