2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ * 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.
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);
}
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;
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. */