cp-tree.h (struct lang_decl): Remove main_decl_variant.

* cp-tree.h (struct lang_decl): Remove main_decl_variant.
	(DECL_MAIN_VARIANT): Remove.
	* decl.c (duplicate_decls): Don't set it.
	(start_function): Likewise.
	(lang_mark_tree): Don't mark it.
	* decl2.c (defer_fn): Don't use it.
	* lex.c (retrofit_lang_decl): Don't set it.
	* pt.c (tsubst_decl): Likewise.
	* ptree.c (print_lang_decl): Don't print it.
	* typeck.c (mark_addressable): Don't use it.

From-SVN: r33048
This commit is contained in:
Mark Mitchell 2000-04-10 06:53:57 +00:00 committed by Mark Mitchell
parent 8c389f849a
commit 144af36dbe
8 changed files with 20 additions and 27 deletions

View File

@ -1,3 +1,16 @@
2000-04-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (struct lang_decl): Remove main_decl_variant.
(DECL_MAIN_VARIANT): Remove.
* decl.c (duplicate_decls): Don't set it.
(start_function): Likewise.
(lang_mark_tree): Don't mark it.
* decl2.c (defer_fn): Don't use it.
* lex.c (retrofit_lang_decl): Don't set it.
* pt.c (tsubst_decl): Likewise.
* ptree.c (print_lang_decl): Don't print it.
* typeck.c (mark_addressable): Don't use it.
2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
* vec.cc: Include <new> and <exception>.

View File

@ -1892,7 +1892,6 @@ struct lang_decl
{
struct lang_decl_flags decl_flags;
tree main_decl_variant;
tree befriending_classes;
/* In a FUNCTION_DECL, this is DECL_SAVED_TREE. */
@ -2107,9 +2106,6 @@ struct lang_decl
this is the shadowed (local) variable. */
#define DECL_SHADOWED_FOR_VAR(NODE) DECL_RESULT_FLD(VAR_DECL_CHECK (NODE))
/* Points back to the decl which caused this lang_decl to be allocated. */
#define DECL_MAIN_VARIANT(NODE) (DECL_LANG_SPECIFIC(NODE)->main_decl_variant)
/* In a FUNCTION_DECL, this is nonzero if this function was defined in
the class definition. We have saved away the text of the function,
but have not yet processed it. */

View File

@ -3632,8 +3632,6 @@ duplicate_decls (newdecl, olddecl)
if (DECL_ARGUMENTS (olddecl))
DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
}
if (DECL_LANG_SPECIFIC (olddecl))
DECL_MAIN_VARIANT (newdecl) = DECL_MAIN_VARIANT (olddecl);
}
if (TREE_CODE (newdecl) == NAMESPACE_DECL)
@ -13393,7 +13391,6 @@ start_function (declspecs, declarator, attrs, flags)
/* And make sure we have enough default args. */
check_default_args (decl1);
}
DECL_MAIN_VARIANT (decl1) = decl1;
fntype = TREE_TYPE (decl1);
}
@ -14767,7 +14764,6 @@ lang_mark_tree (t)
mark_binding_level (&NAMESPACE_LEVEL (t));
if (CAN_HAVE_FULL_LANG_DECL_P (t))
{
ggc_mark_tree (ld->main_decl_variant);
ggc_mark_tree (ld->befriending_classes);
ggc_mark_tree (ld->saved_tree);
if (TREE_CODE (t) == TYPE_DECL)

View File

@ -1982,7 +1982,6 @@ void
defer_fn (fn)
tree fn;
{
fn = DECL_MAIN_VARIANT (fn);
if (DECL_DEFERRED_FN (fn))
return;
DECL_DEFERRED_FN (fn) = 1;

View File

@ -4995,9 +4995,6 @@ retrofit_lang_decl (t)
DECL_LANGUAGE (t) = lang_java;
else my_friendly_abort (64);
if (CAN_HAVE_FULL_LANG_DECL_P (t))
DECL_MAIN_VARIANT (t) = t;
#ifdef GATHER_STATISTICS
tree_node_counts[(int)lang_decl] += 1;
tree_node_sizes[(int)lang_decl] += size;

View File

@ -5700,7 +5700,6 @@ tsubst_decl (t, args, type, in_decl)
DECL_ARGUMENTS (r) = tsubst (DECL_ARGUMENTS (t), args,
/*complain=*/1, t);
DECL_MAIN_VARIANT (r) = r;
DECL_TEMPLATE_RESULT (r) = NULL_TREE;
TREE_STATIC (r) = 0;

View File

@ -44,11 +44,6 @@ print_lang_decl (file, node, indent)
if (TREE_CODE (node) == FIELD_DECL)
return;
indent_to (file, indent + 3);
if (DECL_MAIN_VARIANT (node))
{
fprintf (file, " decl-main-variant ");
fprintf (file, HOST_PTR_PRINTF, DECL_MAIN_VARIANT (node));
}
if (TREE_CODE (node) == FUNCTION_DECL
&& DECL_PENDING_INLINE_INFO (node))
{

View File

@ -4988,15 +4988,13 @@ mark_addressable (exp)
return 1;
case FUNCTION_DECL:
if (DECL_LANG_SPECIFIC (x) != 0)
{
x = DECL_MAIN_VARIANT (x);
/* We have to test both conditions here. The first may be
non-zero in the case of processing a default function. The
second may be non-zero in the case of a template function. */
if (DECL_TEMPLATE_INFO (x) && !DECL_TEMPLATE_SPECIALIZATION (x))
if (DECL_LANG_SPECIFIC (x)
&& DECL_TEMPLATE_INFO (x)
&& !DECL_TEMPLATE_SPECIALIZATION (x))
mark_used (x);
}
TREE_ADDRESSABLE (x) = 1;
TREE_USED (x) = 1;
TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;