lto-streamer-in.c (lto_input_location): Try to reuse previous maps.
2009-10-17 Richard Guenther <rguenther@suse.de> * lto-streamer-in.c (lto_input_location): Try to reuse previous maps. From-SVN: r152953
This commit is contained in:
parent
96d356ef3f
commit
b7dae211cc
@ -1,3 +1,8 @@
|
||||
2009-10-17 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* lto-streamer-in.c (lto_input_location): Try to reuse
|
||||
previous maps.
|
||||
|
||||
2009-10-17 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* lto-streamer-in.c (input_gimple_stmt): Fixup FIELD_DECL
|
||||
|
@ -274,26 +274,30 @@ static location_t
|
||||
lto_input_location (struct lto_input_block *ib, struct data_in *data_in)
|
||||
{
|
||||
expanded_location xloc;
|
||||
location_t loc;
|
||||
|
||||
xloc.file = input_string (data_in, ib);
|
||||
if (xloc.file == NULL)
|
||||
return UNKNOWN_LOCATION;
|
||||
|
||||
xloc.file = canon_file_name (xloc.file);
|
||||
xloc.line = lto_input_sleb128 (ib);
|
||||
xloc.column = lto_input_sleb128 (ib);
|
||||
|
||||
if (data_in->current_file)
|
||||
linemap_add (line_table, LC_LEAVE, false, NULL, 0);
|
||||
if (data_in->current_file != xloc.file)
|
||||
{
|
||||
if (data_in->current_file)
|
||||
linemap_add (line_table, LC_LEAVE, false, NULL, 0);
|
||||
|
||||
data_in->current_file = canon_file_name (xloc.file);
|
||||
linemap_add (line_table, LC_ENTER, false, xloc.file, xloc.line);
|
||||
}
|
||||
else if (data_in->current_line != xloc.line)
|
||||
linemap_line_start (line_table, xloc.line, xloc.column);
|
||||
|
||||
data_in->current_file = xloc.file;
|
||||
data_in->current_line = xloc.line;
|
||||
data_in->current_col = xloc.column;
|
||||
|
||||
linemap_add (line_table, LC_ENTER, false, data_in->current_file, xloc.line);
|
||||
LINEMAP_POSITION_FOR_COLUMN (loc, line_table, xloc.column);
|
||||
|
||||
return loc;
|
||||
return linemap_position_for_column (line_table, xloc.column);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user