diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-11 15:38:23 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-11 15:38:23 +0000 |
commit | 5e8d5ca178a5bba22fa0f21174d0fe6809a85d90 (patch) | |
tree | 1f8b6634cbb2de2c26f1f0daaa4ca85261477f1c /gcc/cp/search.c | |
parent | 9dffd3ffd7ff831f4f0e6bb6cfe70dd2e033d807 (diff) | |
download | gcc-5e8d5ca178a5bba22fa0f21174d0fe6809a85d90.tar.gz |
* cp-tree.h (SAME_BINFO_TYPE_P): New.
* class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
binfo types.
(convert_to_base_statically, determine_primary_bases,
update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
* init.c (expand_member_init): Likewise.
* search.c (lookup_base_r, dynamic_cast_base_recurse,
binfo_via_virtual, copied_binfo, binfo_for_vbase,
original_binfo): Likewise.
* tree.c (copy_binfo): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index ad5dd9e4f3a..b54d9992580 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -90,7 +90,7 @@ lookup_base_r (tree binfo, tree base, base_access access, tree base_binfo; base_kind found = bk_not_base; - if (same_type_p (BINFO_TYPE (binfo), base)) + if (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), base)) { /* We have found a base. Check against what we have found already. */ @@ -279,7 +279,7 @@ dynamic_cast_base_recurse (tree subtype, tree binfo, bool is_via_virtual, int i; int worst = -2; - if (BINFO_TYPE (binfo) == subtype) + if (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), subtype)) { if (is_via_virtual) return -1; @@ -2346,7 +2346,7 @@ binfo_from_vbase (tree binfo) tree binfo_via_virtual (tree binfo, tree limit) { - for (; binfo && (!limit || !same_type_p (BINFO_TYPE (binfo), limit)); + for (; binfo && !SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), limit); binfo = BINFO_INHERITANCE_CHAIN (binfo)) { if (BINFO_VIRTUAL_P (binfo)) @@ -2382,7 +2382,7 @@ copied_binfo (tree binfo, tree here) cbinfo = copied_binfo (BINFO_INHERITANCE_CHAIN (binfo), here); for (ix = 0; BINFO_BASE_ITERATE (cbinfo, ix, base_binfo); ix++) - if (BINFO_TYPE (base_binfo) == BINFO_TYPE (binfo)) + if (SAME_BINFO_TYPE_P (BINFO_TYPE (base_binfo), BINFO_TYPE (binfo))) { result = base_binfo; break; @@ -2390,7 +2390,7 @@ copied_binfo (tree binfo, tree here) } else { - gcc_assert (BINFO_TYPE (here) == BINFO_TYPE (binfo)); + gcc_assert (SAME_BINFO_TYPE_P (BINFO_TYPE (here), BINFO_TYPE (binfo))); result = here; } @@ -2407,7 +2407,7 @@ binfo_for_vbase (tree base, tree t) for (vbases = CLASSTYPE_VBASECLASSES (t), ix = 0; VEC_iterate (tree, vbases, ix, binfo); ix++) - if (BINFO_TYPE (binfo) == base) + if (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), base)) return binfo; return NULL; } @@ -2422,7 +2422,7 @@ original_binfo (tree binfo, tree here) { tree result = NULL; - if (BINFO_TYPE (binfo) == BINFO_TYPE (here)) + if (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), BINFO_TYPE (here))) result = here; else if (BINFO_VIRTUAL_P (binfo)) result = (CLASSTYPE_VBASECLASSES (BINFO_TYPE (here)) @@ -2439,7 +2439,8 @@ original_binfo (tree binfo, tree here) tree base_binfo; for (ix = 0; (base_binfo = BINFO_BASE_BINFO (base_binfos, ix)); ix++) - if (BINFO_TYPE (base_binfo) == BINFO_TYPE (binfo)) + if (SAME_BINFO_TYPE_P (BINFO_TYPE (base_binfo), + BINFO_TYPE (binfo))) { result = base_binfo; break; |