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.h26
1 files changed, 6 insertions, 20 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index 58a7f58..a3e2918 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "alloc-pool.h"
#include "gcov-io.h"
#include "diagnostic.h"
+#include "pointer-set.h"
/* Define when debugging the LTO streamer. This causes the writer
to output the numeric value for the memory address of the tree node
@@ -474,21 +475,12 @@ struct GTY(()) lto_tree_ref_table
};
-/* Mapping between trees and slots in an array. */
-struct lto_decl_slot
-{
- tree t;
- int slot_num;
-};
-
-
/* The lto_tree_ref_encoder struct is used to encode trees into indices. */
struct lto_tree_ref_encoder
{
- htab_t tree_hash_table; /* Maps pointers to indices. */
- unsigned int next_index; /* Next available index. */
- vec<tree> trees; /* Maps indices to pointers. */
+ pointer_map_t *tree_hash_table; /* Maps pointers to indices. */
+ vec<tree> trees; /* Maps indices to pointers. */
};
@@ -788,10 +780,6 @@ extern void lto_value_range_error (const char *,
HOST_WIDE_INT) ATTRIBUTE_NORETURN;
/* In lto-section-out.c */
-extern hashval_t lto_hash_decl_slot_node (const void *);
-extern int lto_eq_decl_slot_node (const void *, const void *);
-extern hashval_t lto_hash_type_slot_node (const void *);
-extern int lto_eq_type_slot_node (const void *, const void *);
extern void lto_begin_section (const char *, bool);
extern void lto_end_section (void);
extern void lto_write_stream (struct lto_output_stream *);
@@ -1007,11 +995,9 @@ lto_tag_check_range (enum LTO_tags actual, enum LTO_tags tag1,
/* Initialize an lto_out_decl_buffer ENCODER. */
static inline void
-lto_init_tree_ref_encoder (struct lto_tree_ref_encoder *encoder,
- htab_hash hash_fn, htab_eq eq_fn)
+lto_init_tree_ref_encoder (struct lto_tree_ref_encoder *encoder)
{
- encoder->tree_hash_table = htab_create (37, hash_fn, eq_fn, free);
- encoder->next_index = 0;
+ encoder->tree_hash_table = pointer_map_create ();
encoder->trees.create (0);
}
@@ -1023,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)
- htab_delete (encoder->tree_hash_table);
+ pointer_map_destroy (encoder->tree_hash_table);
encoder->trees.release ();
}