aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto-streamer.h')
-rw-r--r--gcc/lto-streamer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index 889e91d..566a0e0 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "plugin-api.h"
#include "hash-table.h"
+#include "hash-map.h"
#include "target.h"
#include "cgraph.h"
#include "vec.h"
@@ -472,7 +473,7 @@ struct GTY(()) lto_tree_ref_table
struct lto_tree_ref_encoder
{
- pointer_map<unsigned> *tree_hash_table; /* Maps pointers to indices. */
+ hash_map<tree, unsigned> *tree_hash_table; /* Maps pointers to indices. */
vec<tree> trees; /* Maps indices to pointers. */
};
@@ -994,7 +995,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 = new pointer_map<unsigned>;
+ encoder->tree_hash_table = new hash_map<tree, unsigned> (251);
encoder->trees.create (0);
}
@@ -1005,8 +1006,8 @@ static inline void
lto_destroy_tree_ref_encoder (struct lto_tree_ref_encoder *encoder)
{
/* Hash table may be delete already. */
- if (encoder->tree_hash_table)
- delete encoder->tree_hash_table;
+ delete encoder->tree_hash_table;
+ encoder->tree_hash_table = NULL;
encoder->trees.release ();
}