diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f219c42f655..018a25dbc9e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2006-01-23 Volker Reichelt + * cp-tree.h (build_x_delete): Remove prototype. + * init.c (build_vec_delete_1): Call build_op_delete_call directly + and not via build_x_delete. + (build_x_delete): Remove. + * cp-tree.h (get_vtt_name): Remove prototype. * class.c (get_vtt_name): Remove. (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index c65309c1da9..0c777d790c4 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3949,7 +3949,6 @@ extern tree build_zero_init (tree, tree, bool); extern tree build_offset_ref (tree, tree, bool); extern tree build_new (tree, tree, tree, tree, int); extern tree build_vec_init (tree, tree, tree, bool, int); -extern tree build_x_delete (tree, int, tree); extern tree build_delete (tree, tree, special_function_kind, int, int); diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 3ec55109126..a9b394af6ab 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2247,9 +2247,10 @@ build_vec_delete_1 (tree base, tree maxindex, tree type, } if (auto_delete_vec == sfk_deleting_destructor) - deallocate_expr = build_x_delete (base_tbd, - 2 | use_global_delete, - virtual_size); + deallocate_expr = build_op_delete_call (VEC_DELETE_EXPR, + base_tbd, virtual_size, + use_global_delete & 1, + NULL_TREE); } body = loop; @@ -2609,31 +2610,6 @@ build_vec_init (tree base, tree maxindex, tree init, return stmt_expr; } -/* Free up storage of type TYPE, at address ADDR. - - TYPE is a POINTER_TYPE and can be ptr_type_node for no special type - of pointer. - - VIRTUAL_SIZE is the amount of storage that was allocated, and is - used as the second argument to operator delete. It can include - things like padding and magic size cookies. It has virtual in it, - because if you have a base pointer and you delete through a virtual - destructor, it should be the size of the dynamic object, not the - static object, see Free Store 12.5 ISO C++. - - This does not call any destructors. */ - -tree -build_x_delete (tree addr, int which_delete, tree virtual_size) -{ - int use_global_delete = which_delete & 1; - int use_vec_delete = !!(which_delete & 2); - enum tree_code code = use_vec_delete ? VEC_DELETE_EXPR : DELETE_EXPR; - - return build_op_delete_call (code, addr, virtual_size, use_global_delete, - NULL_TREE); -} - /* Call the DTOR_KIND destructor for EXP. FLAGS are as for build_delete. */