diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-24 13:22:11 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-24 13:22:11 +0000 |
commit | d62dd03970a5f6e18a0479428413081d7e1d7b96 (patch) | |
tree | e42565bc6a235c9d4d379f34d53a38e7f997cb45 /gcc/lto-section-out.c | |
parent | 2933f7af8a2a577315202dc58abaa5ed4cc808b6 (diff) | |
download | gcc-d62dd03970a5f6e18a0479428413081d7e1d7b96.tar.gz |
add hash_map class
gcc/
* alloc-pool.c (alloc_pool_hash): Use hash_map instead of hash_table.
* dominance.c (iterate_fix_dominators): Use hash_map instead of
pointer_map.
* hash-map.h: New file.
* ipa-comdats.c: Use hash_map instead of pointer_map.
* ipa.c: Likewise.
* lto-section-out.c: Adjust.
* lto-streamer.h: Replace pointer_map with hash_map.
* symtab.c (verify_symtab): Likewise.
* tree-ssa-strlen.c (decl_to_stridxlist_htab): Likewise.
* tree-ssa-uncprop.c (val_ssa_equiv): Likewise.
* tree-streamer.h: Likewise.
* tree-streamer.c: Adjust.
* pointer-set.h: Remove pointer_map.
gcc/lto/
* lto.c (canonical_type_hash_cache): Use hash_map instead of
pointer_map.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211938 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-section-out.c')
-rw-r--r-- | gcc/lto-section-out.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c index 9d6926c57cf..00b18016a83 100644 --- a/gcc/lto-section-out.c +++ b/gcc/lto-section-out.c @@ -224,21 +224,17 @@ lto_output_decl_index (struct lto_output_stream *obs, struct lto_tree_ref_encoder *encoder, tree name, unsigned int *this_index) { - unsigned *slot; - unsigned int index; bool new_entry_p = FALSE; bool existed_p; - slot = encoder->tree_hash_table->insert (name, &existed_p); + unsigned int &index + = encoder->tree_hash_table->get_or_insert (name, &existed_p); if (!existed_p) { index = encoder->trees.length (); - *slot = index; encoder->trees.safe_push (name); new_entry_p = TRUE; } - else - index = *slot; if (obs) streamer_write_uhwi_stream (obs, index); |