From ee94fce6ef0432857717b93bdb1aae415ae6e4d6 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 5 Sep 2000 07:31:27 +0000 Subject: Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. (pt.o): Remove dependency on HTAB_H. * cp-tree.h: Include hashtab.h. (walk_tree): Change prototype. (walk_tree_without_duplicates): New function. * decl.c (check_default_argument): Use it. * optimize.c (remap_decl): Adjust calls to walk_tree. (copy_body): Likewise. (expand_calls_inline): Likewise. (calls_setjmp_p): Use walk_tree_without_duplicates. * pt.c: Don't include hashtab.h. (for_each_template_parm): Use walk_tree_without_duplicates. * semantics.c (finish-stmt_tree): Likewise. (expand_body): Likewise. * tree.c (walk_tree): Add additional parameter. (walk_tree_without_duplicates): New function. (count_trees): Use it. (verify_stmt_tree): Adjust call to walk_tree. (find_tree): Use walk_tree_without_duplicates. (no_linkage_check): Likewise. (break_out_target_exprs): Adjust call to walk_tree. (cp_unsave): Likewise. From-SVN: r36155 --- gcc/cp/optimize.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'gcc/cp/optimize.c') diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index c9898b8ace0..d80877c2045 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -109,8 +109,8 @@ remap_decl (decl, id) /* The decl T could be a dynamic array or other variable size type, in which case some fields need to be remapped because they may contain SAVE_EXPRs. */ - walk_tree (&DECL_SIZE (t), copy_body_r, id); - walk_tree (&DECL_SIZE_UNIT (t), copy_body_r, id); + walk_tree (&DECL_SIZE (t), copy_body_r, id, NULL); + walk_tree (&DECL_SIZE_UNIT (t), copy_body_r, id, NULL); if (TREE_TYPE (t) && TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE && TYPE_DOMAIN (TREE_TYPE (t))) { @@ -118,7 +118,7 @@ remap_decl (decl, id) TYPE_DOMAIN (TREE_TYPE (t)) = copy_node (TYPE_DOMAIN (TREE_TYPE (t))); walk_tree (&TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))), - copy_body_r, id); + copy_body_r, id, NULL); } /* Remember it, so that if we encounter this local entity @@ -356,7 +356,7 @@ copy_body (id) tree body; body = DECL_SAVED_TREE (VARRAY_TOP_TREE (id->fns)); - walk_tree (&body, copy_body_r, id); + walk_tree (&body, copy_body_r, id, NULL); return body; } @@ -636,7 +636,8 @@ expand_call_inline (tp, walk_subtrees, data) { if (i == 2) ++id->in_target_cleanup_p; - walk_tree (&TREE_OPERAND (*tp, i), expand_call_inline, data); + walk_tree (&TREE_OPERAND (*tp, i), expand_call_inline, data, + NULL); if (i == 2) --id->in_target_cleanup_p; } @@ -792,7 +793,7 @@ expand_calls_inline (tp, id) { /* Search through *TP, replacing all calls to inline functions by appropriate equivalents. */ - walk_tree (tp, expand_call_inline, id); + walk_tree (tp, expand_call_inline, id, NULL); } /* Optimize the body of FN. */ @@ -879,8 +880,9 @@ int calls_setjmp_p (fn) tree fn; { - return (walk_tree (&DECL_SAVED_TREE (fn), calls_setjmp_r, NULL) - != NULL_TREE); + return walk_tree_without_duplicates (&DECL_SAVED_TREE (fn), + calls_setjmp_r, + NULL) != NULL_TREE; } /* FN is a function that has a complete body. Clone the body as -- cgit v1.2.1