aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2001-02-16 19:12:44 -0500
committerJason Merrill <jason@gcc.gnu.org>2001-02-16 19:12:44 -0500
commit48f22ed28f579852f74a63a8afcba9db5e6f94de (patch)
treef194211fd660947872ff5a314a043c01f7665c3c /gcc
parentb8f971fc25adb70d8f9e7cff24f86e9f7d7ee83b (diff)
downloadgcc-48f22ed28f579852f74a63a8afcba9db5e6f94de.zip
gcc-48f22ed28f579852f74a63a8afcba9db5e6f94de.tar.gz
gcc-48f22ed28f579852f74a63a8afcba9db5e6f94de.tar.bz2
cp-tree.h (DECL_USE_VTT_PARM): Remove.
* cp-tree.h (DECL_USE_VTT_PARM): Remove. * decl2.c (maybe_retrofit_in_chrg): Don't create it. * optimize.c (maybe_clone_body): Don't substitute it. * call.c (build_new_method_call): Check in_chrg instead. * init.c (expand_virtual_init): Likewise. From-SVN: r39785
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/call.c8
-rw-r--r--gcc/cp/cp-tree.h7
-rw-r--r--gcc/cp/decl2.c3
-rw-r--r--gcc/cp/init.c3
-rw-r--r--gcc/cp/optimize.c6
6 files changed, 14 insertions, 21 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 55f14cf..1205069 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2001-02-16 Jason Merrill <jason@redhat.com>
+
+ * cp-tree.h (DECL_USE_VTT_PARM): Remove.
+ * decl2.c (maybe_retrofit_in_chrg): Don't create it.
+ * optimize.c (maybe_clone_body): Don't substitute it.
+ * call.c (build_new_method_call): Check in_chrg instead.
+ * init.c (expand_virtual_init): Likewise.
+
2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
* decl.c (check_tag_decl): Make sure a typedef for an anonymous
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 7e2124f..d3e5ff3 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -4426,9 +4426,10 @@ build_new_method_call (instance, name, args, basetype_path, flags)
or destructor, then we fetch the VTT directly.
Otherwise, we look it up using the VTT we were given. */
vtt = IDENTIFIER_GLOBAL_VALUE (get_vtt_name (current_class_type));
- vtt = build_unary_op (ADDR_EXPR, vtt, /*noconvert=*/1);
- vtt = build (COND_EXPR, TREE_TYPE (vtt),
- DECL_USE_VTT_PARM (current_function_decl),
+ vtt = decay_conversion (vtt);
+ vtt = build (COND_EXPR, TREE_TYPE (vtt),
+ build (EQ_EXPR, boolean_type_node,
+ current_in_charge_parm, integer_zero_node),
DECL_VTT_PARM (current_function_decl),
vtt);
if (TREE_VIA_VIRTUAL (basebinfo))
@@ -4436,7 +4437,6 @@ build_new_method_call (instance, name, args, basetype_path, flags)
my_friendly_assert (BINFO_SUBVTT_INDEX (basebinfo), 20010110);
sub_vtt = build (PLUS_EXPR, TREE_TYPE (vtt), vtt,
BINFO_SUBVTT_INDEX (basebinfo));
- sub_vtt = build_indirect_ref (sub_vtt, NULL);
args = tree_cons (NULL_TREE, sub_vtt, args);
}
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 5810395..f35dd95 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1983,13 +1983,6 @@ struct lang_decl
#define DECL_VTT_PARM(NODE) \
(DECL_LANG_SPECIFIC (NODE)->u2.vtt_parm)
-/* If there's a DECL_VTT_PARM, this is a magic variable that indicates
- whether or not the VTT parm should be used. In a subobject
- constructor, `true' is substituted for this value; in a complete
- object constructor, `false' is substituted instead. */
-#define DECL_USE_VTT_PARM(NODE) \
- (TREE_CHAIN (DECL_VTT_PARM (NODE)))
-
/* Non-zero if NODE is a FUNCTION_DECL for which a VTT parameter is
required. */
#define DECL_NEEDS_VTT_PARM_P(NODE) \
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 5c2940c..9f79148 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -980,9 +980,6 @@ maybe_retrofit_in_chrg (fn)
DECL_VTT_PARM (fn) = build_artificial_parm (vtt_parm_identifier,
vtt_parm_type);
DECL_CONTEXT (DECL_VTT_PARM (fn)) = fn;
- DECL_USE_VTT_PARM (fn) = build_artificial_parm (NULL_TREE,
- boolean_type_node);
- DECL_CONTEXT (DECL_USE_VTT_PARM (fn)) = fn;
}
}
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index e2ac3ba..6386f67 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -872,7 +872,8 @@ expand_virtual_init (binfo, decl)
the vtt_parm in the case of the non-subobject constructor. */
vtbl = build (COND_EXPR,
TREE_TYPE (vtbl),
- DECL_USE_VTT_PARM (current_function_decl),
+ build (EQ_EXPR, boolean_type_node,
+ current_in_charge_parm, integer_zero_node),
vtbl2,
vtbl);
}
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index e18ece9..442cac0 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -990,9 +990,6 @@ maybe_clone_body (fn)
splay_tree_insert (id.decl_map,
(splay_tree_key) DECL_VTT_PARM (fn),
(splay_tree_value) clone_parm);
- splay_tree_insert (id.decl_map,
- (splay_tree_key) DECL_USE_VTT_PARM (fn),
- (splay_tree_value) boolean_true_node);
clone_parm = TREE_CHAIN (clone_parm);
}
/* Otherwise, map the VTT parameter to `NULL'. */
@@ -1001,9 +998,6 @@ maybe_clone_body (fn)
splay_tree_insert (id.decl_map,
(splay_tree_key) DECL_VTT_PARM (fn),
(splay_tree_value) null_pointer_node);
- splay_tree_insert (id.decl_map,
- (splay_tree_key) DECL_USE_VTT_PARM (fn),
- (splay_tree_value) boolean_false_node);
}
}
/* Map other parameters to their equivalents in the cloned