View | Details | Return to bug 45375 | Differences between
and this patch

Collapse All | Expand All

(-)lto-streamer.h (-4 / +13 lines)
Lines 626-631 struct lto_simple_output_block Link Here
626
  struct lto_output_stream *main_stream;
626
  struct lto_output_stream *main_stream;
627
};
627
};
628
628
629
/* location_cache is used at LTO read in to avoid too many duplicates in
630
   the linemap tables.  */
631
#define LOCATION_CACHE_SIZE 8093
632
struct location_cache_entry
633
{
634
  const char *file;
635
  int line;
636
  location_t location;
637
};
638
629
/* Data structure holding all the data and descriptors used when writing
639
/* Data structure holding all the data and descriptors used when writing
630
   an LTO file.  */
640
   an LTO file.  */
631
struct output_block
641
struct output_block
Lines 655-661 struct output_block Link Here
655
     something into the stream and fix these up.  */
665
     something into the stream and fix these up.  */
656
  const char *current_file;
666
  const char *current_file;
657
  int current_line;
667
  int current_line;
658
  int current_col;
659
668
660
  /* True if writing globals and types.  */
669
  /* True if writing globals and types.  */
661
  bool global;
670
  bool global;
Lines 691-699 struct data_in Link Here
691
  /* Number of unnamed labels.  */
700
  /* Number of unnamed labels.  */
692
  unsigned int num_unnamed_labels;
701
  unsigned int num_unnamed_labels;
693
702
694
  const char *current_file;
703
  const char *current_file, *last_file;
695
  int current_line;
704
  int current_line, last_line;
696
  int current_col;
705
  struct location_cache_entry location_cache[LOCATION_CACHE_SIZE];
697
706
698
  /* Maps each reference number to the resolution done by the linker. */
707
  /* Maps each reference number to the resolution done by the linker. */
699
  vec<ld_plugin_symbol_resolution_t> globals_resolution;
708
  vec<ld_plugin_symbol_resolution_t> globals_resolution;
(-)lto-streamer-in.c (-7 / +2 lines)
Lines 132-138 clear_line_info (struct data_in *data_in Link Here
132
    linemap_add (line_table, LC_LEAVE, false, NULL, 0);
132
    linemap_add (line_table, LC_LEAVE, false, NULL, 0);
133
  data_in->current_file = NULL;
133
  data_in->current_file = NULL;
134
  data_in->current_line = 0;
134
  data_in->current_line = 0;
135
  data_in->current_col = 0;
136
}
135
}
137
136
138
137
Lines 159-168 lto_input_location (struct bitpack_d *bp Link Here
159
  if (line_change)
158
  if (line_change)
160
    data_in->current_line = bp_unpack_var_len_unsigned (bp);
159
    data_in->current_line = bp_unpack_var_len_unsigned (bp);
161
160
162
  column_change = bp_unpack_value (bp, 1);
163
  if (column_change)
164
    data_in->current_col = bp_unpack_var_len_unsigned (bp);
165
166
  if (file_change)
161
  if (file_change)
167
    {
162
    {
168
      if (prev_file)
163
      if (prev_file)
Lines 172-180 lto_input_location (struct bitpack_d *bp Link Here
172
		   data_in->current_line);
167
		   data_in->current_line);
173
    }
168
    }
174
  else if (line_change)
169
  else if (line_change)
175
    linemap_line_start (line_table, data_in->current_line, data_in->current_col);
170
    linemap_line_start (line_table, data_in->current_line, 0);
176
171
177
  return linemap_position_for_column (line_table, data_in->current_col);
172
  return linemap_position_for_column (line_table, 0);
178
}
173
}
179
174
180
175
(-)lto-streamer-out.c (-6 lines)
Lines 54-60 clear_line_info (struct output_block *ob Link Here
54
{
54
{
55
  ob->current_file = NULL;
55
  ob->current_file = NULL;
56
  ob->current_line = 0;
56
  ob->current_line = 0;
57
  ob->current_col = 0;
58
}
57
}
59
58
60
59
Lines 173-183 lto_output_location (struct output_block Link Here
173
  if (ob->current_line != xloc.line)
172
  if (ob->current_line != xloc.line)
174
    bp_pack_var_len_unsigned (bp, xloc.line);
173
    bp_pack_var_len_unsigned (bp, xloc.line);
175
  ob->current_line = xloc.line;
174
  ob->current_line = xloc.line;
176
177
  bp_pack_value (bp, ob->current_col != xloc.column, 1);
178
  if (ob->current_col != xloc.column)
179
    bp_pack_var_len_unsigned (bp, xloc.column);
180
  ob->current_col = xloc.column;
181
}
175
}
182
176
183
177

Return to bug 45375