cp-tree.h (build_x_delete): Remove prototype.

* 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.

From-SVN: r110138
This commit is contained in:
Volker Reichelt 2006-01-23 18:22:29 +00:00 committed by Volker Reichelt
parent 6d1e9d1882
commit 1c71c747a0
3 changed files with 9 additions and 29 deletions

View File

@ -1,5 +1,10 @@
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.

View File

@ -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);

View File

@ -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. */