aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-05-19 23:06:55 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-05-19 23:06:55 +0000
commita55583e90977b5445ab295de13f82010f2e1bf82 (patch)
treeb999522d5742e318d0ff17adb2b626999b6dea96 /gcc/cp/typeck.c
parentefc9bd412d3e48467658e5e8c5905669f160dc82 (diff)
downloadgcc-a55583e90977b5445ab295de13f82010f2e1bf82.zip
gcc-a55583e90977b5445ab295de13f82010f2e1bf82.tar.gz
gcc-a55583e90977b5445ab295de13f82010f2e1bf82.tar.bz2
Don't create a separate copy of virtual bases for the CLASSTYPE_VBASECLASSES list.
Don't create a separate copy of virtual bases for the CLASSTYPE_VBASECLASSES list. * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation. (BINFO_FOR_VBASE): Remove. (CANONICAL_BINFO): Adjust. (binfo_for_vbase): New function. * class.c (build_vbase_pointer_fields): Use binfo_for_vbase instead of BINFO_FOR_VBASE. (build_vbase_pointer): Likewise. (build_secondary_vtable): Likewise. (dfs_mark_primary_bases): Likewise. (mark_primary_bases): Likewise. (layout_nonempty_base_or_field): Likewise. (dfs_set_offset_for_shared_vbases): Likewise. (dfs_set_offset_for_unshared_vbases): Likewise. (layout_virtual_bases): Likewise. Adjust for changes to the CLASSTYPE_VBASECLASSES list. (dump_class_hierarchy_r): Use binfo_for_vbase instead of BINFO_FOR_VBASE. (dump_class_hierarchy): Likewise. (finish_vtbls): Likewise. (build_vtbl_initializer): Adjust for changes to the CLASSTYPE_VBASECLASSES list. (build_vbase_offset_vtbl_entries): Use binfo_for_vbase. * decl.c (finish_destructor_body): Adjust for changes to the CLASSTYPE_VBASECLASSES list. * init.c (sort_base_init): Use binfo_for_vbase. (construct_virtual_bases): Adjust for changes to the CLASSTYPE_VBASECLASSES list. (expand_member_init): Use binfo_for_vbase. (build_vbase_delete): Adjust for changes to the CLASSTYPE_VBASECLASSES list. * method.c (do_build_copy_constructor): Likewise. * rtti.c (get_base_offset): Use binfo_for_vbase. (expand_class_desc): Remove #if 0'd code. * search.c (struct vbase_info): Remove vbase_types. (get_base_distance): Use binfo_for_vbase. (lookup_field_queue_p): Use CANONICAL_BINFO. (get_shared_vbase_if_not_primary): Use binfo_for_vbase. (get_pure_virtuals): Adjust for changes to the CLASSTYPE_VBASECLASSES list. (dfs_find_vbases): Use binfo_for_vbase. (dfs_init_vbase_pointers): Likewise. (init_vbase_pointers): Don't initialize vi.vbase_types. (virtual_context): Use binfo_for_vbase. (fixup_all_virtual_upcast_offsets): Adjust for changes to the CLASSTYPE_VBASECLASSES list. (expand_indirect_vtbls_init): Simplify. (dfs_get_vbase_types): Don't replicate virtual bases. (find_vbase_instance): Use binfo_for_vbase. (binfo_for_vbase): New function. * typeck.c (get_delta_difference): Use binfo_for_vbase. From-SVN: r34040
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r--gcc/cp/typeck.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 01606fa..378fc6b 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -5986,11 +5986,10 @@ get_delta_difference (from, to, force)
if (to == from)
return delta;
- /* Should get_base_distance here, so we can check if any thing along the
- path is virtual, and we need to make sure we stay
- inside the real binfos when going through virtual bases.
- Maybe we should replace virtual bases with
- binfo_member (...CLASSTYPE_VBASECLASSES...)... (mrs) */
+ /* Should get_base_distance here, so we can check if any thing along
+ the path is virtual, and we need to make sure we stay inside the
+ real binfos when going through virtual bases. Maybe we should
+ replace virtual bases with BINFO_FOR_VBASE ... (mrs) */
binfo = get_binfo (from, to, 1);
if (binfo == error_mark_node)
{
@@ -6010,7 +6009,7 @@ get_delta_difference (from, to, force)
return delta;
if (binfo_from_vbase (binfo))
{
- binfo = BINFO_FOR_VBASE (BINFO_TYPE (binfo), from);
+ binfo = binfo_for_vbase (BINFO_TYPE (binfo), from);
cp_warning ("pointer to member cast to virtual base `%T' will only work if you are very careful", BINFO_TYPE (binfo));
}
delta = BINFO_OFFSET (binfo);