aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-04-10 06:53:57 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-04-10 06:53:57 +0000
commit144af36dbeaa71da4c6ae776457aa9e769d37b22 (patch)
treeb726f0ebf7f8dbab38ace424055884259f6194ce /gcc
parent8c389f849ab65cfb5bc82fb2a3c4d815e193ecfd (diff)
downloadgcc-144af36dbeaa71da4c6ae776457aa9e769d37b22.zip
gcc-144af36dbeaa71da4c6ae776457aa9e769d37b22.tar.gz
gcc-144af36dbeaa71da4c6ae776457aa9e769d37b22.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/cp-tree.h4
-rw-r--r--gcc/cp/decl.c4
-rw-r--r--gcc/cp/decl2.c1
-rw-r--r--gcc/cp/lex.c3
-rw-r--r--gcc/cp/pt.c1
-rw-r--r--gcc/cp/ptree.c5
-rw-r--r--gcc/cp/typeck.c16
8 files changed, 20 insertions, 27 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3457d8e..5676065 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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>.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index b378689..5ba0e36 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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. */
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index dc29029..561a91d 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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)
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 49bf040..5e370fd 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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;
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 3867ce0..1c4bb57 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -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;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 1c5238b..397d5cf 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -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;
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index aa72384..7a234a5 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -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))
{
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 117f30f..65d75c0 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -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))
- mark_used (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_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;