summaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-12 13:18:13 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-12 13:18:13 +0000
commit4131d641e063777a7ea69d247f9b27f79e9342d0 (patch)
tree9bed28685aff67769026ce197c982cd3996f0f5f /gcc/cp/pt.c
parent05e0956519aefe7929b081da944059e20a11a79f (diff)
downloadgcc-4131d641e063777a7ea69d247f9b27f79e9342d0.tar.gz
* pt.c (for_each_template_parm): Do not check for duplicates.
(for_each_template_parm): Use walk_tree duplicate checking code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75718 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 040476c2181..473b6fe03bd 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -4511,17 +4511,6 @@ for_each_template_parm_r (tree* tp, int* walk_subtrees, void* d)
struct pair_fn_data *pfd = (struct pair_fn_data *) d;
tree_fn_t fn = pfd->fn;
void *data = pfd->data;
- void **slot;
-
- /* If we have already visited this tree, there's no need to walk
- subtrees. Otherwise, add it to the visited table. */
- slot = htab_find_slot (pfd->visited, *tp, INSERT);
- if (*slot)
- {
- *walk_subtrees = 0;
- return NULL_TREE;
- }
- *slot = *tp;
if (TYPE_P (t)
&& for_each_template_parm (TYPE_CONTEXT (t), fn, data, pfd->visited))
@@ -4714,7 +4703,7 @@ for_each_template_parm (tree t, tree_fn_t fn, void* data, htab_t visited)
result = walk_tree (&t,
for_each_template_parm_r,
&pfd,
- NULL) != NULL_TREE;
+ pfd.visited) != NULL_TREE;
/* Clean up. */
if (!visited)