Commit 44433db0 by Jan Hubicka Committed by Jan Hubicka

lto-streamer-out.c (lto_output_location): Stream reserved locations correctly.


	* lto-streamer-out.c (lto_output_location): Stream
	reserved locations correctly.
	* lto-streamer-in.c (lto_output_location): Likewise.

From-SVN: r224251
parent 13fdf2e2
2015-06-08 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-out.c (lto_output_location): Stream
reserved locations correctly.
* lto-streamer-in.c (lto_output_location): Likewise.
2015-06-08 Andrew MacLeod <amacleod@redhat.com> 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
* coretypes.h: Include hash-table.h and hash-set.h for host files. * coretypes.h: Include hash-table.h and hash-set.h for host files.
......
...@@ -272,12 +272,13 @@ lto_location_cache::input_location (location_t *loc, struct bitpack_d *bp, ...@@ -272,12 +272,13 @@ lto_location_cache::input_location (location_t *loc, struct bitpack_d *bp,
gcc_assert (current_cache == this); gcc_assert (current_cache == this);
if (bp_unpack_value (bp, 1)) *loc = bp_unpack_int_in_range (bp, "location", 0, RESERVED_LOCATION_COUNT);
{
*loc = UNKNOWN_LOCATION; if (*loc < RESERVED_LOCATION_COUNT)
return; return;
}
*loc = BUILTINS_LOCATION + 1; /* Keep value RESERVED_LOCATION_COUNT in *loc as linemap lookups will
ICE on it. */
file_change = bp_unpack_value (bp, 1); file_change = bp_unpack_value (bp, 1);
line_change = bp_unpack_value (bp, 1); line_change = bp_unpack_value (bp, 1);
......
...@@ -196,8 +196,10 @@ lto_output_location (struct output_block *ob, struct bitpack_d *bp, ...@@ -196,8 +196,10 @@ lto_output_location (struct output_block *ob, struct bitpack_d *bp,
expanded_location xloc; expanded_location xloc;
loc = LOCATION_LOCUS (loc); loc = LOCATION_LOCUS (loc);
bp_pack_value (bp, loc == UNKNOWN_LOCATION, 1); bp_pack_int_in_range (bp, 0, RESERVED_LOCATION_COUNT,
if (loc == UNKNOWN_LOCATION) loc < RESERVED_LOCATION_COUNT
? loc : RESERVED_LOCATION_COUNT);
if (loc < RESERVED_LOCATION_COUNT)
return; return;
xloc = expand_location (loc); xloc = expand_location (loc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment