From 1a57987b55541f7941a6297fef8dc36da55a8ac2 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Mon, 12 Jul 2004 23:53:13 +0000 Subject: [PATCH] cp-tree.h (get_aggr_typedef): Remove. * cp-tree.h (get_aggr_typedef): Remove. * init.c (get_aggr_typedef): Likewise. From-SVN: r84588 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/cp-tree.h | 1 - gcc/cp/init.c | 30 ------------------------------ 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5cc789417b5..b94b245d5e9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2004-07-12 Mark Mitchell + * cp-tree.h (get_aggr_typedef): Remove. + * init.c (get_aggr_typedef): Likewise. + * name-lookup.c (push_class_level_binding): Simplify. 2004-07-12 Andrew Pinski diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index a8d6f04fa06..3311bc03797 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3860,7 +3860,6 @@ extern void emit_mem_initializers (tree); extern tree build_aggr_init (tree, tree, int); extern tree build_init (tree, tree, int); extern int is_aggr_type (tree, int); -extern tree get_aggr_from_typedef (tree, int); extern tree get_type_value (tree); extern tree build_zero_init (tree, tree, bool); extern tree build_offset_ref (tree, tree, bool); diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 9b2a8f56c30..0fa2365e585 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1299,36 +1299,6 @@ is_aggr_type (tree type, int or_else) return 1; } -/* Like is_aggr_typedef, but returns typedef if successful. */ - -tree -get_aggr_from_typedef (tree name, int or_else) -{ - tree type; - - if (name == error_mark_node) - return NULL_TREE; - - if (IDENTIFIER_HAS_TYPE_VALUE (name)) - type = IDENTIFIER_TYPE_VALUE (name); - else - { - if (or_else) - error ("`%T' fails to be an aggregate typedef", name); - return NULL_TREE; - } - - if (! IS_AGGR_TYPE (type) - && TREE_CODE (type) != TEMPLATE_TYPE_PARM - && TREE_CODE (type) != BOUND_TEMPLATE_TEMPLATE_PARM) - { - if (or_else) - error ("type `%T' is of non-aggregate type", type); - return NULL_TREE; - } - return type; -} - tree get_type_value (tree name) { -- 2.30.2