diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-05-19 23:06:55 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-05-19 23:06:55 +0000 |
commit | a55583e90977b5445ab295de13f82010f2e1bf82 (patch) | |
tree | b999522d5742e318d0ff17adb2b626999b6dea96 /gcc/cp/rtti.c | |
parent | efc9bd412d3e48467658e5e8c5905669f160dc82 (diff) | |
download | gcc-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/rtti.c')
-rw-r--r-- | gcc/cp/rtti.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 426c5c3..a7c13b5 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -548,7 +548,7 @@ get_base_offset (binfo, parent) /* Under the new ABI, we store the vtable offset at which the virtual base offset can be found. */ return convert (sizetype, - BINFO_VPTR_FIELD (BINFO_FOR_VBASE (BINFO_TYPE (binfo), + BINFO_VPTR_FIELD (binfo_for_vbase (BINFO_TYPE (binfo), parent))); } @@ -930,11 +930,6 @@ expand_class_desc (tdecl, type) int i = CLASSTYPE_N_BASECLASSES (type); int base_cnt = 0; tree binfos = TYPE_BINFO_BASETYPES (type); -#if 0 - /* See code below that used these. */ - tree vb = CLASSTYPE_VBASECLASSES (type); - int n_base = i; -#endif tree base, elems, access, offset, isvir; tree elt, elts = NULL_TREE; @@ -1000,39 +995,6 @@ expand_class_desc (tdecl, type) elts = tree_cons (NULL_TREE, elt, elts); base_cnt++; } -#if 0 - i = n_base; - while (vb) - { - tree b; - access = access_public_node; - while (--i >= 0) - { - b = TREE_VEC_ELT (binfos, i); - if (BINFO_TYPE (vb) == BINFO_TYPE (b) && TREE_VIA_VIRTUAL (b)) - { - if (TREE_VIA_PUBLIC (b)) - access = access_public_node; - else if (TREE_VIA_PROTECTED (b)) - access = access_protected_node; - else - access = access_private_node; - break; - } - } - base = build_t_desc (BINFO_TYPE (vb), 1); - offset = BINFO_OFFSET (vb); - isvir = build_int_2 (1, 0); - - base_list = tree_cons (NULL_TREE, base, base_list); - isvir_list = tree_cons (NULL_TREE, isvir, isvir_list); - acc_list = tree_cons (NULL_TREE, access, acc_list); - off_list = tree_cons (NULL_TREE, offset, off_list); - - base_cnt++; - vb = TREE_CHAIN (vb); - } -#endif name_string = tinfo_name (type); |