diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-02 11:34:54 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-02 11:34:54 +0000 |
commit | 06ecf4884b35f5ee5b211f0c2f753d5d4eee2481 (patch) | |
tree | b20f9df1d7e2cb3a642d2fab604f827c7d23712a /gcc/c | |
parent | 431205b753bfa26d1711e40ce478d9e92fd157da (diff) | |
download | gcc-06ecf4884b35f5ee5b211f0c2f753d5d4eee2481.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213517 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index c8c957d7437..35d958c1809 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,5 +1,9 @@ 2014-08-02 Trevor Saunders <tsaunders@mozilla.com> + * c-typeck.c: Use hash_map instead of pointer_map. + +2014-08-02 Trevor Saunders <tsaunders@mozilla.com> + * c-decl.c: Use hash_set instead of pointer_set. 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com> diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index fe9440c39d9..1b664bd0258 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -11800,15 +11800,15 @@ c_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; @@ -11817,7 +11817,6 @@ c_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; } |