diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-04-26 17:49:22 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-04-26 17:49:22 +0200 |
commit | 86262bb186922557dba15c5fa21785837f4006cd (patch) | |
tree | 218d95c71f1fa0c5326665282d638411daab546d /gcc/cp/class.c | |
parent | 9c7bd91af7c94d7628b2fa3f8be2e0098f4a2692 (diff) | |
download | gcc-86262bb186922557dba15c5fa21785837f4006cd.zip gcc-86262bb186922557dba15c5fa21785837f4006cd.tar.gz gcc-86262bb186922557dba15c5fa21785837f4006cd.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 5578eb2..fa5e00f 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" |