diff options
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cf119859b70..452488a37f3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2014-08-02 Trevor Saunders <tsaunders@mozilla.com> + + * gcc-interface/trans.c: Use hash_set instead of pointer_set. + 2014-08-01 Ed Schonberg <schonberg@adacore.com> * restrict.adb (Update_Restrictions): For restrictions with a diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 3323a565857..77a8f87f2d1 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -36,7 +36,7 @@ #include "output.h" #include "libfuncs.h" /* For set_stack_check_libfunc. */ #include "tree-iterator.h" -#include "pointer-set.h" +#include "hash-set.h" #include "gimple-expr.h" #include "gimplify.h" #include "bitmap.h" @@ -3008,7 +3008,7 @@ struct nrv_data bitmap nrv; tree result; Node_Id gnat_ret; - struct pointer_set_t *visited; + hash_set<tree> *visited; }; /* Return true if T is a Named Return Value. */ @@ -3142,7 +3142,7 @@ finalize_nrv_r (tree *tp, int *walk_subtrees, void *data) /* Avoid walking into the same tree more than once. Unfortunately, we can't just use walk_tree_without_duplicates because it would only call us for the first occurrence of NRVs in the function body. */ - if (pointer_set_insert (dp->visited, *tp)) + if (dp->visited->add (*tp)) *walk_subtrees = 0; return NULL_TREE; @@ -3282,7 +3282,7 @@ finalize_nrv_unc_r (tree *tp, int *walk_subtrees, void *data) /* Avoid walking into the same tree more than once. Unfortunately, we can't just use walk_tree_without_duplicates because it would only call us for the first occurrence of NRVs in the function body. */ - if (pointer_set_insert (dp->visited, *tp)) + if (dp->visited->add (*tp)) *walk_subtrees = 0; return NULL_TREE; @@ -3330,13 +3330,13 @@ finalize_nrv (tree fndecl, bitmap nrv, vec<tree, va_gc> *other, Node_Id gnat_ret data.nrv = nrv; data.result = DECL_RESULT (fndecl); data.gnat_ret = gnat_ret; - data.visited = pointer_set_create (); + data.visited = new hash_set<tree>; if (TYPE_RETURN_UNCONSTRAINED_P (TREE_TYPE (fndecl))) func = finalize_nrv_unc_r; else func = finalize_nrv_r; walk_tree (&DECL_SAVED_TREE (fndecl), func, &data, NULL); - pointer_set_destroy (data.visited); + delete data.visited; } /* Return true if RET_VAL can be used as a Named Return Value for the |