diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-10 14:27:59 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-10 14:27:59 +0000 |
commit | ec180527b92e9ec019098194346107ee087d181a (patch) | |
tree | 3534db32ee5430daa60040a605add057d9c96f94 /gcc/lto-streamer-in.c | |
parent | e27648001a3c16969022f402ecfbb3e52a6c566e (diff) | |
download | gcc-ec180527b92e9ec019098194346107ee087d181a.tar.gz |
2012-10-10 Richard Biener <rguenther@suse.de>
* lto-streamer-in.c (lto_input_location_bitpack): Rename to ...
(lto_input_location): ... this. Kill original.
(input_eh_region): Adjust.
(input_struct_function_base): Likewise.
(lto_read_tree): Likewise.
* lto-streamer-out.c (lto_output_location_bitpack): Rename to ...
(lto_output_location): ... this. Kill original.
(lto_write_tree): Adjust.
(output_eh_region): Likewise.
(output_struct_function_base): Likewise.
* lto-streamer.c (lto_streamer_hooks_init): Initialize location
hooks.
* lto-streamer.h (lto_input_location): Adjust prototype.
(lto_output_location): Likewise.
* streamer-hooks.h (struct streamer_hooks): Adjust prototype
of input_location and output_location hooks.
(stream_input_location): New define.
(stream_output_location): Likewise.
* tree-streamer-in.c (unpack_ts_block_value_fields): Adjust.
(unpack_value_fields): Likewise.
(streamer_read_tree_bitfields): Likewise.
(lto_input_ts_decl_minimal_tree_pointers): Likewise.
(lto_input_ts_exp_tree_pointers): Likewise.
(lto_input_ts_block_tree_pointers): Likewise.
* tree-streamer-out.c (pack_ts_block_value_fields): Adjust.
(streamer_pack_tree_bitfields): Likewise.
(write_ts_decl_minimal_tree_pointers): Likewise.
(write_ts_exp_tree_pointers): Likewise.
(write_ts_block_tree_pointers): Likewise.
* gimple-streamer-in.c (input_phi): Adjust.
(input_gimple_stmt): Likewise.
* gimple-streamer-out.c (output_phi): Adjust.
(output_gimple_stmt): Likewise.
* tree-streamer.h (streamer_read_tree_bitfields): Adjust prototype.
(streamer_pack_tree_bitfields): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192317 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r-- | gcc/lto-streamer-in.c | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 91215216f9d..a5d13eec5ff 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -138,8 +138,8 @@ clear_line_info (struct data_in *data_in) /* Read a location bitpack from input block IB. */ -static location_t -lto_input_location_bitpack (struct data_in *data_in, struct bitpack_d *bp) +location_t +lto_input_location (struct bitpack_d *bp, struct data_in *data_in) { bool file_change, line_change, column_change; unsigned len; @@ -178,26 +178,6 @@ lto_input_location_bitpack (struct data_in *data_in, struct bitpack_d *bp) } -/* Read a location from input block IB. - If the input_location streamer hook exists, call it. - Otherwise, proceed with reading the location from the - expanded location bitpack. */ - -location_t -lto_input_location (struct lto_input_block *ib, struct data_in *data_in) -{ - if (streamer_hooks.input_location) - return streamer_hooks.input_location (ib, data_in); - else - { - struct bitpack_d bp; - - bp = streamer_read_bitpack (ib); - return lto_input_location_bitpack (data_in, &bp); - } -} - - /* Read a reference to a tree node from DATA_IN using input block IB. TAG is the expected node that should be found in IB, if TAG belongs to one of the indexable trees, expect to read a reference index to @@ -368,9 +348,13 @@ input_eh_region (struct lto_input_block *ib, struct data_in *data_in, int ix) break; case LTO_ert_must_not_throw: - r->type = ERT_MUST_NOT_THROW; - r->u.must_not_throw.failure_decl = stream_read_tree (ib, data_in); - r->u.must_not_throw.failure_loc = lto_input_location (ib, data_in); + { + r->type = ERT_MUST_NOT_THROW; + r->u.must_not_throw.failure_decl = stream_read_tree (ib, data_in); + bitpack_d bp = streamer_read_bitpack (ib); + r->u.must_not_throw.failure_loc + = stream_input_location (&bp, data_in); + } break; default: @@ -786,10 +770,6 @@ input_struct_function_base (struct function *fn, struct data_in *data_in, } } - /* Input the function start and end loci. */ - fn->function_start_locus = lto_input_location (ib, data_in); - fn->function_end_locus = lto_input_location (ib, data_in); - /* Input the current IL state of the function. */ fn->curr_properties = streamer_read_uhwi (ib); @@ -809,6 +789,10 @@ input_struct_function_base (struct function *fn, struct data_in *data_in, fn->calls_setjmp = bp_unpack_value (&bp, 1); fn->va_list_fpr_size = bp_unpack_value (&bp, 8); fn->va_list_gpr_size = bp_unpack_value (&bp, 8); + + /* Input the function start and end loci. */ + fn->function_start_locus = stream_input_location (&bp, data_in); + fn->function_end_locus = stream_input_location (&bp, data_in); } @@ -1041,7 +1025,7 @@ lto_read_tree (struct lto_input_block *ib, struct data_in *data_in, /* Read all the bitfield values in RESULT. Note that for LTO, we only write language-independent bitfields, so no more unpacking is needed. */ - streamer_read_tree_bitfields (ib, result); + streamer_read_tree_bitfields (ib, data_in, result); /* Read all the pointer fields in RESULT. */ streamer_read_tree_body (ib, data_in, result); |