From: jamborm Date: Tue, 26 Apr 2011 15:49:22 +0000 (+0000) Subject: 2011-04-26 Martin Jambor X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=129f9079a12d24650cb2ecf42e4e4cc75d05bbc3;p=thirdparty%2Fgcc.git 2011-04-26 Martin Jambor * class.c (cp_fold_obj_type_ref): Remove. * cp-tree.h (cp_fold_obj_type_ref): Remove declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172977 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c0ea9d36b585..cf477a81390f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-04-26 Martin Jambor + + * class.c (cp_fold_obj_type_ref): Remove. + * cp-tree.h (cp_fold_obj_type_ref): Remove declaration. + 2011-04-25 Paolo Carlini * cp-tree.def: Add a new UNDERLYING_TYPE tree code. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 5578eb2bd9b2..fa5e00fcb1fd 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -8377,32 +8377,4 @@ build_rtti_vtbl_entries (tree binfo, vtbl_init_data* vid) 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" diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 1c7a4e66f61d..cb04b2477d07 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -4718,7 +4718,6 @@ extern void note_name_declared_in_class (tree, tree); extern tree get_vtbl_decl_for_binfo (tree); extern void debug_class (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 determine_key_method (tree); extern void check_for_override (tree, tree);