+2015-08-31 Richard Biener <rguenther@suse.de>
+
+ * lto-streamer.h (lto_location_cache::cached_location::sysp): Add.
+ (lto_location_cache::current_sysp): Likewise.
+ (output_block::current_sysp): Likewise.
+ * lto-streamer-in.c (lto_location_cache::cmp_loc): Compare sysp.
+ (lto_location_cache::apply_location_cache): Properly record
+ system header locations.
+ (lto_location_cache::input_location): Input whether a file
+ is a system header.
+ * lto-streamer-out.c (lto_output_location): Stream whether a file
+ is a system header.
+
2015-08-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR bootstrap/67363
}
if (a->file != b->file)
return strcmp (a->file, b->file);
+ if (a->sysp != b->sysp)
+ return a->sysp ? 1 : -1;
if (a->line != b->line)
return a->line - b->line;
return a->col - b->col;
if (current_file != loc.file)
linemap_add (line_table, prev_file ? LC_RENAME : LC_ENTER,
- false, loc.file, loc.line);
+ loc.sysp, loc.file, loc.line);
else if (current_line != loc.line)
{
int max = loc.col;
static const char *stream_file;
static int stream_line;
static int stream_col;
+ static bool stream_sysp;
bool file_change, line_change, column_change;
gcc_assert (current_cache == this);
column_change = bp_unpack_value (bp, 1);
if (file_change)
- stream_file = canon_file_name (bp_unpack_string (data_in, bp));
+ {
+ stream_file = canon_file_name (bp_unpack_string (data_in, bp));
+ stream_sysp = bp_unpack_value (bp, 1);
+ }
if (line_change)
stream_line = bp_unpack_var_len_unsigned (bp);
streaming. */
if (current_file == stream_file && current_line == stream_line
- && current_col == stream_col)
+ && current_col == stream_col && current_sysp == stream_sysp)
{
*loc = current_loc;
return;
}
- struct cached_location entry = {stream_file, loc, stream_line, stream_col};
+ struct cached_location entry
+ = {stream_file, loc, stream_line, stream_col, stream_sysp};
loc_cache.safe_push (entry);
}
bp_pack_value (bp, ob->current_col != xloc.column, 1);
if (ob->current_file != xloc.file)
- bp_pack_string (ob, bp, xloc.file, true);
+ {
+ bp_pack_string (ob, bp, xloc.file, true);
+ bp_pack_value (bp, xloc.sysp, 1);
+ }
ob->current_file = xloc.file;
+ ob->current_sysp = xloc.sysp;
if (ob->current_line != xloc.line)
bp_pack_var_len_unsigned (bp, xloc.line);