Commit 86262bb1 by Martin Jambor Committed by Martin Jambor

class.c (cp_fold_obj_type_ref): Remove.

2011-04-26  Martin Jambor  <mjambor@suse.cz>

	* class.c (cp_fold_obj_type_ref): Remove.
	* cp-tree.h (cp_fold_obj_type_ref): Remove declaration.

From-SVN: r172977
parent 9c7bd91a
2011-04-26 Martin Jambor <mjambor@suse.cz>
* class.c (cp_fold_obj_type_ref): Remove.
* cp-tree.h (cp_fold_obj_type_ref): Remove declaration.
2011-04-25 Paolo Carlini <paolo.carlini@oracle.com> 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.def: Add a new UNDERLYING_TYPE tree code. * cp-tree.def: Add a new UNDERLYING_TYPE tree code.
......
...@@ -8377,32 +8377,4 @@ build_rtti_vtbl_entries (tree binfo, vtbl_init_data* vid) ...@@ -8377,32 +8377,4 @@ build_rtti_vtbl_entries (tree binfo, vtbl_init_data* vid)
CONSTRUCTOR_APPEND_ELT (vid->inits, NULL_TREE, init); CONSTRUCTOR_APPEND_ELT (vid->inits, NULL_TREE, init);
} }
/* Fold a OBJ_TYPE_REF expression to the address of a function.
KNOWN_TYPE carries the true type of OBJ_TYPE_REF_OBJECT(REF). */
tree
cp_fold_obj_type_ref (tree ref, tree known_type)
{
HOST_WIDE_INT index = tree_low_cst (OBJ_TYPE_REF_TOKEN (ref), 1);
HOST_WIDE_INT i = 0;
tree v = BINFO_VIRTUALS (TYPE_BINFO (known_type));
tree fndecl;
while (i != index)
{
i += (TARGET_VTABLE_USES_DESCRIPTORS
? TARGET_VTABLE_USES_DESCRIPTORS : 1);
v = TREE_CHAIN (v);
}
fndecl = BV_FN (v);
#ifdef ENABLE_CHECKING
gcc_assert (tree_int_cst_equal (OBJ_TYPE_REF_TOKEN (ref),
DECL_VINDEX (fndecl)));
#endif
return build_address (fndecl);
}
#include "gt-cp-class.h" #include "gt-cp-class.h"
...@@ -4718,7 +4718,6 @@ extern void note_name_declared_in_class (tree, tree); ...@@ -4718,7 +4718,6 @@ extern void note_name_declared_in_class (tree, tree);
extern tree get_vtbl_decl_for_binfo (tree); extern tree get_vtbl_decl_for_binfo (tree);
extern void debug_class (tree); extern void debug_class (tree);
extern void debug_thunks (tree); extern void debug_thunks (tree);
extern tree cp_fold_obj_type_ref (tree, tree);
extern void set_linkage_according_to_type (tree, tree); extern void set_linkage_according_to_type (tree, tree);
extern void determine_key_method (tree); extern void determine_key_method (tree);
extern void check_for_override (tree, tree); extern void check_for_override (tree, tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment