aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-08-02 11:34:54 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2014-08-02 11:34:54 +0000
commitb787e7a2c2c9be2f548d4c76ec324b71859851a4 (patch)
treeb20f9df1d7e2cb3a642d2fab604f827c7d23712a /gcc/cp/semantics.c
parent6e2830c3dbe0d4972519ddd44bd1b15b2b274ba2 (diff)
downloadgcc-b787e7a2c2c9be2f548d4c76ec324b71859851a4.zip
gcc-b787e7a2c2c9be2f548d4c76ec324b71859851a4.tar.gz
gcc-b787e7a2c2c9be2f548d4c76ec324b71859851a4.tar.bz2
convert many uses of pointer_map to hash_map
gcc/c-family/ * cilk.c: Use hash_map instead of pointer_map. gcc/c/ * c-typeck.c: Use hash_map instead of pointer_map. gcc/cp/ * optimize.c, semantics.c: Use hash_map instead of pointer_map. gcc/ * hash-map.h (default_hashmap_traits::mark_key_deleted): Fix cast. (hash_map::remove): New method. (hash_map::traverse): New method. * cgraph.h, except.c, except.h, gimple-ssa-strength-reduction.c, ipa-utils.c, lto-cgraph.c, lto-streamer.h, omp-low.c, predict.c, tree-cfg.c, tree-cfgcleanup.c, tree-eh.c, tree-eh.h, tree-inline.c, tree-inline.h, tree-nested.c, tree-sra.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-reassoc.c, tree-ssa-structalias.c, tree-ssa.c, tree-ssa.h, var-tracking.c: Use hash_map instead of pointer_map. From-SVN: r213517
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 735284e..4868d69 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -4977,15 +4977,15 @@ clone_omp_udr (tree stmt, tree omp_decl1, tree omp_decl2,
tree decl, tree placeholder)
{
copy_body_data id;
- struct pointer_map_t *decl_map = pointer_map_create ();
+ hash_map<tree, tree> decl_map;
- *pointer_map_insert (decl_map, omp_decl1) = placeholder;
- *pointer_map_insert (decl_map, omp_decl2) = decl;
+ decl_map.put (omp_decl1, placeholder);
+ decl_map.put (omp_decl2, decl);
memset (&id, 0, sizeof (id));
id.src_fn = DECL_CONTEXT (omp_decl1);
id.dst_fn = current_function_decl;
id.src_cfun = DECL_STRUCT_FUNCTION (id.src_fn);
- id.decl_map = decl_map;
+ id.decl_map = &decl_map;
id.copy_decl = copy_decl_no_change;
id.transform_call_graph_edges = CB_CGE_DUPLICATE;
@@ -4994,7 +4994,6 @@ clone_omp_udr (tree stmt, tree omp_decl1, tree omp_decl2,
id.transform_lang_insert_block = NULL;
id.eh_lp_nr = 0;
walk_tree (&stmt, copy_tree_body_r, &id, NULL);
- pointer_map_destroy (decl_map);
return stmt;
}