diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-10-12 16:04:24 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-10-12 16:04:24 +0000 |
commit | 5b94d9dd86ad94777503632b0732345836af0104 (patch) | |
tree | b6d1d3d25dcd57406ee545bea62de48c980d04e4 /gcc/cp/search.c | |
parent | fa91adc640e8ace532fac4077085a9904518b530 (diff) | |
download | gcc-5b94d9dd86ad94777503632b0732345836af0104.tar.gz |
class.c (dfs_modify_vtables): Simplify condition.
* class.c (dfs_modify_vtables): Simplify condition. Return
dfs_skip_bases as appropriate.
(modify_all_vtables): Walk in pre-order.
* search.c (dfs_walk_all, dfs_walk_once_r,
dfs_walk_once_accessible_r): Assert post order function never
returns dfs_skip_bases.
From-SVN: r88939
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 9ab861f6aef..b90f1921ac2 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -1542,7 +1542,12 @@ dfs_walk_all (tree binfo, tree (*pre_fn) (tree, void *), skip_bases: /* Call the post-order walking function. */ if (post_fn) - return post_fn (binfo, data); + { + rval = post_fn (binfo, data); + gcc_assert (rval != dfs_skip_bases); + return rval; + } + return NULL_TREE; } @@ -1588,7 +1593,11 @@ dfs_walk_once_r (tree binfo, tree (*pre_fn) (tree, void *), skip_bases: /* Call the post-order walking function. */ if (post_fn) - return post_fn (binfo, data); + { + rval = post_fn (binfo, data); + gcc_assert (rval != dfs_skip_bases); + return rval; + } return NULL_TREE; } @@ -1710,7 +1719,11 @@ dfs_walk_once_accessible_r (tree binfo, bool friends_p, bool once, skip_bases: /* Call the post-order walking function. */ if (post_fn) - return post_fn (binfo, data); + { + rval = post_fn (binfo, data); + gcc_assert (rval != dfs_skip_bases); + return rval; + } return NULL_TREE; } |