diff options
author | Richard Guenther <rguenther@suse.de> | 2007-08-20 11:19:22 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-08-20 11:19:22 +0000 |
commit | 145881069e8d5a19e131b5c1922bdb2e27b708da (patch) | |
tree | 86faaa7d5f8b59c06113801b45f3d5eae539e5f1 /gcc/cp/pt.c | |
parent | 412bbe81d92ba9c32a2ebd523391bb8f6637a2f7 (diff) | |
download | gcc-145881069e8d5a19e131b5c1922bdb2e27b708da.zip gcc-145881069e8d5a19e131b5c1922bdb2e27b708da.tar.gz gcc-145881069e8d5a19e131b5c1922bdb2e27b708da.tar.bz2 |
tree.c (WALK_SUBTREE): Call walk_tree_1.
2007-08-20 Richard Guenther <rguenther@suse.de>
* tree.c (WALK_SUBTREE): Call walk_tree_1.
(walk_type_fields): Take lh parameter.
(walk_tree): Rename to ...
(walk_tree_1): ... this. Do not call the walk_subtrees
langhook but the now passed callback. Pass lh on recursion.
(walk_tree_without_duplicates): Rename to ...
(walk_tree_without_duplicates_1): ... this. Take lh parameter
and call walk_tree_1.
* tree.h (walk_tree_lh): New typedef.
(walk_tree_1): Declare.
(walk_tree_without_duplicates_1): Likewise.
(walk_tree): New define to walk_tree_1 with NULL lh parameter.
(walk_tree_without_duplicates): New define to
walk_tree_without_duplicates_1 with NULL lh parameter.
* langhooks.c (lhd_tree_inlining_walk_subtrees): Remove.
* langhooks.h (lang_hooks_for_tree_inlining): Remove walk_subtrees
langhook.
* langhooks-def.h (lhd_tree_inlining_walk_subtrees): Remove.
(LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Likewise.
(LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove walk_subtrees
initializer.
java/
* lang.c (java_tree_inlining_walk_subtrees): Remove.
(LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
cp/
* cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
Remove define.
* tree.h (cp_walk_tree): New define to walk_tree_1 with
cp_walk_subtrees lh parameter.
(cp_walk_tree_without_duplicates): New define to
walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
* tree.c (count_trees): Call
cp_walk_tree_without_duplicates.
(verify_stmt_tree): Call cp_walk_tree.
(break_out_target_exprs): Likewise.
(WALK_SUBTREE): Likewise.
* cp-gimplify.c (cp_genericize): Likewise.
* cp-pt.c (find_parameter_packs_r): Likewise.
(uses_parameter_packs): Likewise.
(make_pack_expansion): Likewise.
(check_for_bare_parameter_packs): Likewise.
(for_each_template_parm): Likewise.
* decl.c (check_default_argument): Call
cp_walk_tree_without_duplicates.
* except.c (build_throw): Likewise.
* decl2.c (type_visibility): Likewise.
* semantics.c (expand_or_defer_fn): Likewise.
(finalize_nrv): Call cp_walk_tree.
From-SVN: r127642
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 76d3518..3f218e6 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2391,7 +2391,7 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data) if (TYPE_P (t)) { tree context = TYPE_CONTEXT (t); - walk_tree (&context, &find_parameter_packs_r, ppd, ppd->visited); + cp_walk_tree (&context, &find_parameter_packs_r, ppd, ppd->visited); } /* This switch statement will return immediately if we don't find a @@ -2405,8 +2405,8 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data) case BOUND_TEMPLATE_TEMPLATE_PARM: /* Check the template arguments. */ - walk_tree (&TYPE_TI_ARGS (t), &find_parameter_packs_r, ppd, - ppd->visited); + cp_walk_tree (&TYPE_TI_ARGS (t), &find_parameter_packs_r, ppd, + ppd->visited); /* Dig out the underlying TEMPLATE_TEMPLATE_PARM. */ t = TYPE_TI_TEMPLATE (t); @@ -2442,7 +2442,7 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data) if (TYPE_TEMPLATE_INFO (t)) { tree args = TREE_VALUE (TYPE_TEMPLATE_INFO (t)); - walk_tree (&args, &find_parameter_packs_r, ppd, ppd->visited); + cp_walk_tree (&args, &find_parameter_packs_r, ppd, ppd->visited); } *walk_subtrees = 0; @@ -2462,8 +2462,8 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data) return NULL_TREE; case INTEGER_TYPE: - walk_tree (&TYPE_MAX_VALUE (t), &find_parameter_packs_r, - ppd, ppd->visited); + cp_walk_tree (&TYPE_MAX_VALUE (t), &find_parameter_packs_r, + ppd, ppd->visited); *walk_subtrees = 0; return NULL_TREE; @@ -2485,7 +2485,7 @@ uses_parameter_packs (tree t) struct find_parameter_pack_data ppd; ppd.parameter_packs = ¶meter_packs; ppd.visited = pointer_set_create (); - walk_tree (&t, &find_parameter_packs_r, &ppd, ppd.visited); + cp_walk_tree (&t, &find_parameter_packs_r, &ppd, ppd.visited); pointer_set_destroy (ppd.visited); return parameter_packs != NULL_TREE; } @@ -2535,8 +2535,8 @@ make_pack_expansion (tree arg) class expansion. */ ppd.visited = pointer_set_create (); ppd.parameter_packs = ¶meter_packs; - walk_tree (&TREE_PURPOSE (arg), &find_parameter_packs_r, - &ppd, ppd.visited); + cp_walk_tree (&TREE_PURPOSE (arg), &find_parameter_packs_r, + &ppd, ppd.visited); if (parameter_packs == NULL_TREE) { @@ -2553,8 +2553,8 @@ make_pack_expansion (tree arg) { /* Determine which parameter packs will be expanded in this argument. */ - walk_tree (&TREE_VALUE (value), &find_parameter_packs_r, - &ppd, ppd.visited); + cp_walk_tree (&TREE_VALUE (value), &find_parameter_packs_r, + &ppd, ppd.visited); } } @@ -2592,7 +2592,7 @@ make_pack_expansion (tree arg) /* Determine which parameter packs will be expanded. */ ppd.parameter_packs = ¶meter_packs; ppd.visited = pointer_set_create (); - walk_tree (&arg, &find_parameter_packs_r, &ppd, ppd.visited); + cp_walk_tree (&arg, &find_parameter_packs_r, &ppd, ppd.visited); pointer_set_destroy (ppd.visited); /* Make sure we found some parameter packs. */ @@ -2637,7 +2637,7 @@ check_for_bare_parameter_packs (tree t) ppd.parameter_packs = ¶meter_packs; ppd.visited = pointer_set_create (); - walk_tree (&t, &find_parameter_packs_r, &ppd, ppd.visited); + cp_walk_tree (&t, &find_parameter_packs_r, &ppd, ppd.visited); pointer_set_destroy (ppd.visited); if (parameter_packs) @@ -5896,10 +5896,10 @@ for_each_template_parm (tree t, tree_fn_t fn, void* data, pfd.visited = visited; else pfd.visited = pointer_set_create (); - result = walk_tree (&t, - for_each_template_parm_r, - &pfd, - pfd.visited) != NULL_TREE; + result = cp_walk_tree (&t, + for_each_template_parm_r, + &pfd, + pfd.visited) != NULL_TREE; /* Clean up. */ if (!visited) |