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.h46
1 files changed, 7 insertions, 39 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index 6ab0505..fc7e431 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -249,38 +249,12 @@ enum lto_section_type
/* Indices to the various function, type and symbol streams. */
enum lto_decl_stream_e_t
{
- LTO_DECL_STREAM_TYPE = 0, /* Must be first. */
- LTO_DECL_STREAM_FIELD_DECL,
- LTO_DECL_STREAM_FN_DECL,
- LTO_DECL_STREAM_VAR_DECL,
- LTO_DECL_STREAM_TYPE_DECL,
- LTO_DECL_STREAM_NAMESPACE_DECL,
- LTO_DECL_STREAM_LABEL_DECL,
+ LTO_DECL_STREAM = 0, /* Must be first. */
LTO_N_DECL_STREAMS
};
typedef enum ld_plugin_symbol_resolution ld_plugin_symbol_resolution_t;
-
-/* Macro to define convenience functions for type and decl streams
- in lto_file_decl_data. */
-#define DEFINE_DECL_STREAM_FUNCS(UPPER_NAME, name) \
-static inline tree \
-lto_file_decl_data_get_ ## name (struct lto_file_decl_data *data, \
- unsigned int idx) \
-{ \
- struct lto_in_decl_state *state = data->current_decl_state; \
- return (*state->streams[LTO_DECL_STREAM_## UPPER_NAME])[idx]; \
-} \
-\
-static inline unsigned int \
-lto_file_decl_data_num_ ## name ## s (struct lto_file_decl_data *data) \
-{ \
- struct lto_in_decl_state *state = data->current_decl_state; \
- return vec_safe_length (state->streams[LTO_DECL_STREAM_## UPPER_NAME]); \
-}
-
-
/* Return a char pointer to the start of a data stream for an lto pass
or function. The first parameter is the file data that contains
the information. The second parameter is the type of information
@@ -908,10 +882,12 @@ extern struct output_block *create_output_block (enum lto_section_type);
extern void destroy_output_block (struct output_block *);
extern void lto_output_tree (struct output_block *, tree, bool, bool);
extern void stream_write_tree_ref (struct output_block *, tree);
-extern void lto_output_var_decl_index (struct lto_out_decl_state *,
- struct lto_output_stream *, tree);
-extern void lto_output_fn_decl_index (struct lto_out_decl_state *,
- struct lto_output_stream *, tree);
+extern void lto_output_var_decl_ref (struct lto_out_decl_state *,
+ struct lto_output_stream *, tree);
+extern void lto_output_fn_decl_ref (struct lto_out_decl_state *,
+ struct lto_output_stream *, tree);
+extern tree lto_input_var_decl_ref (lto_input_block *, lto_file_decl_data *);
+extern tree lto_input_fn_decl_ref (lto_input_block *, lto_file_decl_data *);
extern void lto_output_toplevel_asms (void);
extern void produce_asm (struct output_block *ob, tree fn);
extern void lto_output ();
@@ -1251,14 +1227,6 @@ lsei_start_variable_in_partition (lto_symtab_encoder_t encoder)
return lsei;
}
-DEFINE_DECL_STREAM_FUNCS (TYPE, type)
-DEFINE_DECL_STREAM_FUNCS (FIELD_DECL, field_decl)
-DEFINE_DECL_STREAM_FUNCS (FN_DECL, fn_decl)
-DEFINE_DECL_STREAM_FUNCS (VAR_DECL, var_decl)
-DEFINE_DECL_STREAM_FUNCS (TYPE_DECL, type_decl)
-DEFINE_DECL_STREAM_FUNCS (NAMESPACE_DECL, namespace_decl)
-DEFINE_DECL_STREAM_FUNCS (LABEL_DECL, label_decl)
-
/* Entry for the delayed registering of decl -> DIE references. */
struct dref_entry {
tree decl;