aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-09-27 12:00:08 +0000
committerNathan Sidwell <nathan@codesourcery.com>2004-09-27 12:00:08 +0000
commite40e09da7ed5334563844b12d36d050bdeb7a5a0 (patch)
treeecfec79fb69f49e8c3f8e058a7f40be3f9c62a96 /gcc/cp/search.c
parent97d9cf9be3e810ebed54094159aed9b0df036d40 (diff)
* class.c (struct count_depth_data): Remove.
(dfs_depth_post, dfs_depth_q): Remove. (find_final_overrider): Use number of vbase classes as depth bound. * cp-tree.h (types_overlap_p): Remove. * search.c (struct overlap_info): Remove. (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove. * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove. (get_template_base_recursive): Remove. Replace with ... (get_template_base_r): ... this. (struct get_template_base_data_s): New. (get_template_base): Use get_template_base_r via dfs_walk. Always return NULL on failure. (unify): Remove error_mark_node check from get_template_base result. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@88169 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 67b891f85e3..96d273be195 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -46,8 +46,6 @@ struct vbase_info
};
static int is_subobject_of_p (tree, tree);
-static tree dfs_check_overlap (tree, void *);
-static tree dfs_no_overlap_yet (tree, int, void *);
static base_kind lookup_base_r (tree, tree, base_access, bool, tree *);
static int dynamic_cast_base_recurse (tree, tree, bool, tree *);
static tree dfs_debug_unmarkedp (tree, int, void *);
@@ -2272,65 +2270,6 @@ lookup_conversions (tree type)
return list;
}
-struct overlap_info
-{
- tree compare_type;
- int found_overlap;
-};
-
-/* Check whether the empty class indicated by EMPTY_BINFO is also present
- at offset 0 in COMPARE_TYPE, and set found_overlap if so. */
-
-static tree
-dfs_check_overlap (tree empty_binfo, void *data)
-{
- struct overlap_info *oi = (struct overlap_info *) data;
- tree binfo;
-
- for (binfo = TYPE_BINFO (oi->compare_type);
- ;
- binfo = BINFO_BASE_BINFO (binfo, 0))
- {
- if (BINFO_TYPE (binfo) == BINFO_TYPE (empty_binfo))
- {
- oi->found_overlap = 1;
- break;
- }
- else if (!BINFO_N_BASE_BINFOS (binfo))
- break;
- }
-
- return NULL_TREE;
-}
-
-/* Trivial function to stop base traversal when we find something. */
-
-static tree
-dfs_no_overlap_yet (tree derived, int ix, void *data)
-{
- tree binfo = BINFO_BASE_BINFO (derived, ix);
- struct overlap_info *oi = (struct overlap_info *) data;
-
- return !oi->found_overlap ? binfo : NULL_TREE;
-}
-
-/* Returns nonzero if EMPTY_TYPE or any of its bases can also be found at
- offset 0 in NEXT_TYPE. Used in laying out empty base class subobjects. */
-
-int
-types_overlap_p (tree empty_type, tree next_type)
-{
- struct overlap_info oi;
-
- if (! IS_AGGR_TYPE (next_type))
- return 0;
- oi.compare_type = next_type;
- oi.found_overlap = 0;
- dfs_walk (TYPE_BINFO (empty_type), dfs_check_overlap,
- dfs_no_overlap_yet, &oi);
- return oi.found_overlap;
-}
-
/* Returns the binfo of the first direct or indirect virtual base derived
from BINFO, or NULL if binfo is not via virtual. */