aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2018-12-22 21:06:52 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2018-12-22 20:06:52 +0000
commit4611c03d2b0edefc8d8e17872ef143428f56380b (patch)
treeae0e33447d1fbef7cf93d110ce90a633b543b633 /gcc/tree.c
parentb5e1a724542d517b8c6861047141f8c805b6c3f9 (diff)
downloadgcc-4611c03d2b0edefc8d8e17872ef143428f56380b.zip
gcc-4611c03d2b0edefc8d8e17872ef143428f56380b.tar.gz
gcc-4611c03d2b0edefc8d8e17872ef143428f56380b.tar.bz2
tree.c: (obj_type_ref_class): Move to...
* tree.c: (obj_type_ref_class): Move to... * ipa-devirt.c (obj_type_ref_class): Move to here; lookup main odr type. (get_odr_type): Compensate for type simplification. * g++.dg/ipa/devirt-30.C: Add dg-do. * g++.dg/lto/devirt-1_0.C: New testcase. * g++.dg/lto/devirt-2_0.C: New testcase. * g++.dg/lto/devirt-3_0.C: New testcase. * g++.dg/lto/devirt-4_0.C: New testcase. * g++.dg/lto/devirt-5_0.C: New testcase. * g++.dg/lto/devirt-6_0.C: New testcase. * g++.dg/lto/devirt-13_0.C: New testcase. * g++.dg/lto/devirt-14_0.C: New testcase. * g++.dg/lto/devirt-19_0.C: New testcase. * g++.dg/lto/devirt-22_0.C: New testcase. * g++.dg/lto/devirt-23_0.C: New testcase. * g++.dg/lto/devirt-30_0.C: New testcase. * g++.dg/lto/devirt-34_0.C: New testcase. From-SVN: r267359
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 5d0d4d3..c3d4bb8 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -12838,25 +12838,6 @@ virtual_method_call_p (const_tree target)
return true;
}
-/* REF is OBJ_TYPE_REF, return the class the ref corresponds to. */
-
-tree
-obj_type_ref_class (const_tree ref)
-{
- gcc_checking_assert (TREE_CODE (ref) == OBJ_TYPE_REF);
- ref = TREE_TYPE (ref);
- gcc_checking_assert (TREE_CODE (ref) == POINTER_TYPE);
- ref = TREE_TYPE (ref);
- /* We look for type THIS points to. ObjC also builds
- OBJ_TYPE_REF with non-method calls, Their first parameter
- ID however also corresponds to class type. */
- gcc_checking_assert (TREE_CODE (ref) == METHOD_TYPE
- || TREE_CODE (ref) == FUNCTION_TYPE);
- ref = TREE_VALUE (TYPE_ARG_TYPES (ref));
- gcc_checking_assert (TREE_CODE (ref) == POINTER_TYPE);
- return TREE_TYPE (ref);
-}
-
/* Lookup sub-BINFO of BINFO of TYPE at offset POS. */
static tree