summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-02 11:23:49 +0000
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-02 11:23:49 +0000
commit431205b753bfa26d1711e40ce478d9e92fd157da (patch)
treef0fb192e856fa98b7d91e225ff958dfcc1f602df /gcc/cp/decl2.c
parent69d7692e60d4a7c61b4d3581f3285a866ec3abb1 (diff)
downloadgcc-431205b753bfa26d1711e40ce478d9e92fd157da.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213516 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index eafdce57690..9ed763d9737 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3920,11 +3920,11 @@ generate_ctor_and_dtor_functions_for_priority (splay_tree_node n, void * data)
supported, collect and return all the functions for which we should
emit a hidden alias. */
-static struct pointer_set_t *
+static hash_set<tree> *
collect_candidates_for_java_method_aliases (void)
{
struct cgraph_node *node;
- struct pointer_set_t *candidates = NULL;
+ hash_set<tree> *candidates = NULL;
#ifndef HAVE_GAS_HIDDEN
return candidates;
@@ -3939,8 +3939,8 @@ collect_candidates_for_java_method_aliases (void)
&& TARGET_USE_LOCAL_THUNK_ALIAS_P (fndecl))
{
if (candidates == NULL)
- candidates = pointer_set_create ();
- pointer_set_insert (candidates, fndecl);
+ candidates = new hash_set<tree>;
+ candidates->add (fndecl);
}
}
@@ -3955,7 +3955,7 @@ collect_candidates_for_java_method_aliases (void)
by collect_candidates_for_java_method_aliases. */
static void
-build_java_method_aliases (struct pointer_set_t *candidates)
+build_java_method_aliases (hash_set<tree> *candidates)
{
struct cgraph_node *node;
@@ -3968,7 +3968,7 @@ build_java_method_aliases (struct pointer_set_t *candidates)
tree fndecl = node->decl;
if (TREE_ASM_WRITTEN (fndecl)
- && pointer_set_contains (candidates, fndecl))
+ && candidates->contains (fndecl))
{
/* Mangle the name in a predictable way; we need to reference
this from a java compiled object file. */
@@ -4278,7 +4278,7 @@ cp_write_global_declarations (void)
unsigned ssdf_count = 0;
int retries = 0;
tree decl;
- struct pointer_set_t *candidates;
+ hash_set<tree> *candidates;
locus = input_location;
at_eof = 1;
@@ -4672,7 +4672,7 @@ cp_write_global_declarations (void)
if (candidates)
{
build_java_method_aliases (candidates);
- pointer_set_destroy (candidates);
+ delete candidates;
}
finish_repo ();