aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/optimize.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-04-12 07:48:13 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-04-12 07:48:13 +0000
commit298d6f60996d885b092748404528b60159a359ca (patch)
tree1607e4b03e19e5a1a352f78d3cd7ac33ece46c16 /gcc/cp/optimize.c
parent1ba82fb2c46478e543fee347651fc167fef2ccdb (diff)
downloadgcc-298d6f60996d885b092748404528b60159a359ca.zip
gcc-298d6f60996d885b092748404528b60159a359ca.tar.gz
gcc-298d6f60996d885b092748404528b60159a359ca.tar.bz2
cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
* cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER. (cp_push_exception_identifier): New macro. (DECL_COMPLETE_DESTRUCTOR_P): New macro. (DECL_BASE_DESTRUCTOR_P): Likewise. (DECL_DELETING_DESTRUCTOR_P): Likewise. (get_vtbl_decl_for_binfo): Fix formatting. (in_charge_arg_for_name): New macro. (maybe_build_cleanup_and_delete): Remove declaration. * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P. (in_charge_arg_for_name): New function. (build_new_method_call): Use it. Handle cloned destructors. (build_clone): Don't make the base constructor virtual. Automatically defer generated functions. (clone_function_decl): Handle destructors, too. (clone_constructors_and_destructors): Likewise. (create_vtable_ptr): Don't create a vtable entry for a cloned function. * decl.c (predefined_identifier): Add ctor_or_dtor_p. (initialize_predefined_identifiers): Update appropriately. (finish_destructor_body): Simplify. (maybe_build_cleanup_and_delete): Remove. * except.c (expand_throw): Handle new-ABI destructors. * init.c (expand_cleanup_for_base): Use base_dtor_identifier. (build_dtor_call): New function. (build_delete): Use it. Simplify. * optimize.c (maybe_clone_body): Handle destructors. * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P. From-SVN: r33096
Diffstat (limited to 'gcc/cp/optimize.c')
-rw-r--r--gcc/cp/optimize.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 9f2fe35..5c78950 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -804,10 +804,6 @@ maybe_clone_body (fn)
&& !DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (fn))
return 0;
- /* We don't yet handle destructors. */
- if (DECL_DESTRUCTOR_P (fn))
- return 0;
-
/* We know that any clones immediately follow FN in the TYPE_METHODS
list. */
for (clone = TREE_CHAIN (fn);
@@ -850,12 +846,7 @@ maybe_clone_body (fn)
if (DECL_HAS_IN_CHARGE_PARM_P (fn) && parmno == 1)
{
tree in_charge;
-
- if (DECL_COMPLETE_CONSTRUCTOR_P (clone))
- in_charge = integer_one_node;
- else
- in_charge = integer_zero_node;
-
+ in_charge = in_charge_arg_for_name (DECL_NAME (clone));
splay_tree_insert (id.decl_map,
(splay_tree_key) parm,
(splay_tree_key) in_charge);