summaryrefslogtreecommitdiff
path: root/gcc/lto-streamer.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-24 12:17:16 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-24 12:17:16 +0000
commitea1a929fd73a1d6c04c612149bbd68e26294c3f8 (patch)
tree0b144aa71725e9242031811c26d608114f637c95 /gcc/lto-streamer.h
parent443752924e1b037c705e32c919bf6bc993fc10a5 (diff)
downloadgcc-ea1a929fd73a1d6c04c612149bbd68e26294c3f8.tar.gz
2013-06-24 Richard Biener <rguenther@suse.de>
* pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. (pointer_set_lookup): Declare. (class pointer_map): New template class implementing a generic pointer to T map. (pointer_map<T>::pointer_map, pointer_map<T>::~pointer_map, pointer_map<T>::contains, pointer_map<T>::insert, pointer_map<T>::traverse): New functions. * pointer-set.c (struct pointer_set_t): Moved to pointer-set.h. (pointer_set_lookup): New function. (pointer_set_contains): Use pointer_set_lookup. (pointer_set_insert): Likewise. (insert_aux): Remove. (struct pointer_map_t): Embed a pointer_set_t. (pointer_map_create): Adjust. (pointer_map_destroy): Likewise. (pointer_map_contains): Likewise. (pointer_map_insert): Likewise. (pointer_map_traverse): Likewise. * tree-streamer.h (struct streamer_tree_cache_d): Use a pointer_map<unsigned> instead of a pointer_map_t. * tree-streamer.c (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_lookup): Likewise. (streamer_tree_cache_create): Likewise. (streamer_tree_cache_delete): Likewise. * lto-streamer.h (struct lto_tree_ref_encoder): Use a pointer_map<unsigned> instead of a pointer_map_t. (lto_init_tree_ref_encoder): Adjust. (lto_destroy_tree_ref_encoder): Likewise. * lto-section-out.c (lto_output_decl_index): Likewise. (lto_record_function_out_decl_state): Likewise. * dominance.c (iterate_fix_dominators): Use pointer_map<int>. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200367 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer.h')
-rw-r--r--gcc/lto-streamer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index a3e2918f6f3..e7c89f16162 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -479,7 +479,7 @@ struct GTY(()) lto_tree_ref_table
struct lto_tree_ref_encoder
{
- pointer_map_t *tree_hash_table; /* Maps pointers to indices. */
+ pointer_map<unsigned> *tree_hash_table; /* Maps pointers to indices. */
vec<tree> trees; /* Maps indices to pointers. */
};
@@ -997,7 +997,7 @@ lto_tag_check_range (enum LTO_tags actual, enum LTO_tags tag1,
static inline void
lto_init_tree_ref_encoder (struct lto_tree_ref_encoder *encoder)
{
- encoder->tree_hash_table = pointer_map_create ();
+ encoder->tree_hash_table = new pointer_map<unsigned>;
encoder->trees.create (0);
}
@@ -1009,7 +1009,7 @@ lto_destroy_tree_ref_encoder (struct lto_tree_ref_encoder *encoder)
{
/* Hash table may be delete already. */
if (encoder->tree_hash_table)
- pointer_map_destroy (encoder->tree_hash_table);
+ delete encoder->tree_hash_table;
encoder->trees.release ();
}