summaryrefslogtreecommitdiff
path: root/gcc/streamer-hooks.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-27 06:58:59 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-27 06:58:59 +0000
commitda6f3259a0dcb2e94a087c3b1dfa0b0eca027f73 (patch)
treecbd2e935efaa0cca2a297c9acffbbdf68e1c834d /gcc/streamer-hooks.h
parent73594827bcf4d56bc73f80eef9b5c1370c07e4f8 (diff)
downloadgcc-da6f3259a0dcb2e94a087c3b1dfa0b0eca027f73.tar.gz
PR lto/65536
* lto-streamer.h (class lto_location_cache): New. (struct data_in): Add location_cache. (lto_input_location): Update prototype. (stream_input_location_now): New. * streamer-hooks.h (struct streamer_hooks): Make input_location to take pointer to location. (stream_input_location): Update. * ipa-devirt.c: Include streamer-hooks.h and lto-streamer.h (warn_odr): Apply location cache before warning. (lto_input_location): Update prototype. * gimple-streamer-in.c (input_phi, input_gimple_stmt): Use stream_input_location_now. * lto/lto.c (unify_scc): Revert location cache when unification suceeded. (lto_read_decls): Accept location cache after sucess; apply location cache before calling debug hooks. * lto-streamer-in.c (lto_location_cache::current_cache): New static variable. (lto_location_cache::cmp_loc): New function. (lto_location_cache::apply_location_cache): New function. (lto_location_cache::accept_location_cache): New function. (lto_location_cache::revert_location_cache): New function. (lto_location_cache::input_location): New function. (lto_input_location): Do location caching. (stream_input_location_now): New function. (input_eh_region, input_struct_function_base): Use stream_input_location_now. (lto_data_in_create): use new. (lto_data_in_delete): Use delete. * tree-streamer-in.c (unpack_ts_block_value_fields, unpack_ts_omp_clause_value_fields, streamer_read_tree_bitfields, lto_input_ts_exp_tree_pointers): Update for cached location api. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221720 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/streamer-hooks.h')
-rw-r--r--gcc/streamer-hooks.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/streamer-hooks.h b/gcc/streamer-hooks.h
index f0f1832f798..8678b89d5f5 100644
--- a/gcc/streamer-hooks.h
+++ b/gcc/streamer-hooks.h
@@ -52,7 +52,7 @@ struct streamer_hooks {
tree (*read_tree) (struct lto_input_block *, struct data_in *);
/* [REQ] Called by every streaming routine that needs to read a location. */
- location_t (*input_location) (struct bitpack_d *, struct data_in *);
+ void (*input_location) (location_t *, struct bitpack_d *, struct data_in *);
/* [REQ] Called by every streaming routine that needs to write a location. */
void (*output_location) (struct output_block *, struct bitpack_d *, location_t);
@@ -67,8 +67,8 @@ struct streamer_hooks {
#define stream_read_tree(IB, DATA_IN) \
streamer_hooks.read_tree (IB, DATA_IN)
-#define stream_input_location(BP, DATA_IN) \
- streamer_hooks.input_location (BP, DATA_IN)
+#define stream_input_location(LOCPTR, BP, DATA_IN) \
+ streamer_hooks.input_location (LOCPTR, BP, DATA_IN)
#define stream_output_location(OB, BP, LOC) \
streamer_hooks.output_location (OB, BP, LOC)