aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-08-02 11:23:49 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-08-02 11:23:49 +0000
commit6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2 (patch)
treef0fb192e856fa98b7d91e225ff958dfcc1f602df /gcc/tree-eh.c
parent2df06cec0a2fe611c5487bf54c4ef8e3b2b30543 (diff)
downloadgcc-6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2.zip
gcc-6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2.tar.gz
gcc-6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2.tar.bz2
add a hash_set based on hash_table
This allows us to replace the usage of pointer_set outside of pointer_map with a nicer interface. gcc/ada/ * gcc-interface/trans.c: Use hash_set instead of pointer_set. gcc/c-family/ * c-gimplify.c: Use hash_set instead of pointer_set. gcc/c/ * c-decl.c: Use hash_set instead of pointer_set. gcc/cp/ * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c, method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set instead of pointer_set. gcc/fortran/ * openmp.c, trans-decl.c: Use hash_set instead of pointer_set. gcc/ * hash-set.h: new File. * cfgexpand.c, cfgloop.c, cgraph.c, cgraphbuild.c, cgraphunit.c, cprop.c, cse.c, gimple-walk.c, gimple-walk.h, gimplify.c, godump.c, ipa-devirt.c, ipa-pure-const.c, ipa-visibility.c, ipa.c, lto-cgraph.c, lto-streamer-out.c, stmt.c, tree-cfg.c, tree-core.h, tree-eh.c, tree-inline.c, tree-inline.h, tree-nested.c, tree-pretty-print.c, tree-ssa-loop-niter.c, tree-ssa-phiopt.c, tree-ssa-threadedge.c, tree-ssa-uninit.c, tree.c, tree.h, value-prof.c, varasm.c, varpool.c: Use hash_set instead of pointer_set. gcc/lto/ * lto-partition.c, lto-partition.h: Use hash_set instead of pointer_set. From-SVN: r213516
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index df9a6fc..38842e8 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "function.h"
#include "except.h"
+#include "hash-set.h"
#include "pointer-set.h"
#include "basic-block.h"
#include "tree-ssa-alias.h"
@@ -3578,7 +3579,7 @@ lower_eh_dispatch (basic_block src, gimple stmt)
eh_catch c;
edge_iterator ei;
edge e;
- struct pointer_set_t *seen_values = pointer_set_create ();
+ hash_set<tree> seen_values;
/* Collect the labels for a switch. Zero the post_landing_pad
field becase we'll no longer have anything keeping these labels
@@ -3605,12 +3606,12 @@ lower_eh_dispatch (basic_block src, gimple stmt)
attached to the handler anymore, we remove
the corresponding edge and then we delete unreachable
blocks at the end of this pass. */
- if (! pointer_set_contains (seen_values, TREE_VALUE (flt_node)))
+ if (! seen_values.contains (TREE_VALUE (flt_node)))
{
tree t = build_case_label (TREE_VALUE (flt_node),
NULL, lab);
labels.safe_push (t);
- pointer_set_insert (seen_values, TREE_VALUE (flt_node));
+ seen_values.add (TREE_VALUE (flt_node));
have_label = true;
}
@@ -3662,7 +3663,6 @@ lower_eh_dispatch (basic_block src, gimple stmt)
x = gimple_build_switch (filter, default_label, labels);
gsi_insert_before (&gsi, x, GSI_SAME_STMT);
}
- pointer_set_destroy (seen_values);
}
break;