mirror of git://gcc.gnu.org/git/gcc.git
LINEMAP_POSITION_FOR_COLUMN had the exact same effect as linemap_position_for_column...
LINEMAP_POSITION_FOR_COLUMN had the exact same effect as linemap_position_for_column, removed it and updated users to use linemap_position_for_column instead libcpp/ChangeLog * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove. Update all users to use linemap_position_for_column instead. gcc/go/ChangeLog * gofrontend/lex.cc (Lex::location): Update to use linemap_position_for_column instead. (Lex::earlier_location): Likewise. From-SVN: r177768
This commit is contained in:
parent
e535f1b229
commit
3f6ced102d
|
@ -1,3 +1,9 @@
|
||||||
|
2011-08-15 Gabriel Charette <gchare@google.com>
|
||||||
|
|
||||||
|
* gofrontend/lex.cc (Lex::location): Update to use
|
||||||
|
linemap_position_for_column instead.
|
||||||
|
(Lex::earlier_location): Likewise.
|
||||||
|
|
||||||
2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||||
|
|
||||||
* Make-lang.in (gccgo$(exeext)): Add $(EXTRA_GCC_LIBS).
|
* Make-lang.in (gccgo$(exeext)): Add $(EXTRA_GCC_LIBS).
|
||||||
|
|
|
@ -518,9 +518,7 @@ Lex::require_line()
|
||||||
source_location
|
source_location
|
||||||
Lex::location() const
|
Lex::location() const
|
||||||
{
|
{
|
||||||
source_location location;
|
return linemap_position_for_column (line_table, this->lineoff_ + 1);
|
||||||
LINEMAP_POSITION_FOR_COLUMN(location, line_table, this->lineoff_ + 1);
|
|
||||||
return location;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a location slightly before the current one. This is used for
|
// Get a location slightly before the current one. This is used for
|
||||||
|
@ -529,9 +527,7 @@ Lex::location() const
|
||||||
source_location
|
source_location
|
||||||
Lex::earlier_location(int chars) const
|
Lex::earlier_location(int chars) const
|
||||||
{
|
{
|
||||||
source_location location;
|
return linemap_position_for_column (line_table, this->lineoff_ + 1 - chars);
|
||||||
LINEMAP_POSITION_FOR_COLUMN(location, line_table, this->lineoff_ + 1 - chars);
|
|
||||||
return location;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the next token.
|
// Get the next token.
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2011-08-15 Gabriel Charette <gchare@google.com>
|
||||||
|
|
||||||
|
* include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove.
|
||||||
|
Update all users to use linemap_position_for_column instead.
|
||||||
|
|
||||||
2011-07-28 Gabriel Charette <gchare@google.com>
|
2011-07-28 Gabriel Charette <gchare@google.com>
|
||||||
|
|
||||||
* include/line-map.h (struct line_maps):
|
* include/line-map.h (struct line_maps):
|
||||||
|
|
|
@ -142,7 +142,7 @@ _cpp_preprocess_dir_only (cpp_reader *pfile,
|
||||||
flags |= DO_LINE_COMMENT;
|
flags |= DO_LINE_COMMENT;
|
||||||
else if (!(flags & DO_SPECIAL))
|
else if (!(flags & DO_SPECIAL))
|
||||||
/* Mark the position for possible error reporting. */
|
/* Mark the position for possible error reporting. */
|
||||||
LINEMAP_POSITION_FOR_COLUMN (loc, pfile->line_table, col);
|
loc = linemap_position_for_column (pfile->line_table, col);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -165,23 +165,6 @@ extern const struct line_map *linemap_lookup
|
||||||
/* Nonzero if the map is at the bottom of the include stack. */
|
/* Nonzero if the map is at the bottom of the include stack. */
|
||||||
#define MAIN_FILE_P(MAP) ((MAP)->included_from < 0)
|
#define MAIN_FILE_P(MAP) ((MAP)->included_from < 0)
|
||||||
|
|
||||||
/* Set LOC to a source position that is the same line as the most recent
|
|
||||||
linemap_line_start, but with the specified TO_COLUMN column number. */
|
|
||||||
|
|
||||||
#define LINEMAP_POSITION_FOR_COLUMN(LOC, SET, TO_COLUMN) do { \
|
|
||||||
unsigned int to_column = (TO_COLUMN); \
|
|
||||||
struct line_maps *set = (SET); \
|
|
||||||
if (__builtin_expect (to_column >= set->max_column_hint, 0)) \
|
|
||||||
(LOC) = linemap_position_for_column (set, to_column); \
|
|
||||||
else { \
|
|
||||||
source_location r = set->highest_line; \
|
|
||||||
r = r + to_column; \
|
|
||||||
if (r >= set->highest_location) \
|
|
||||||
set->highest_location = r; \
|
|
||||||
(LOC) = r; \
|
|
||||||
}} while (0)
|
|
||||||
|
|
||||||
|
|
||||||
extern source_location
|
extern source_location
|
||||||
linemap_position_for_column (struct line_maps *set, unsigned int to_column);
|
linemap_position_for_column (struct line_maps *set, unsigned int to_column);
|
||||||
|
|
||||||
|
|
|
@ -1975,7 +1975,7 @@ _cpp_lex_direct (cpp_reader *pfile)
|
||||||
}
|
}
|
||||||
c = *buffer->cur++;
|
c = *buffer->cur++;
|
||||||
|
|
||||||
LINEMAP_POSITION_FOR_COLUMN (result->src_loc, pfile->line_table,
|
result->src_loc = linemap_position_for_column (pfile->line_table,
|
||||||
CPP_BUF_COLUMN (buffer, buffer->cur));
|
CPP_BUF_COLUMN (buffer, buffer->cur));
|
||||||
|
|
||||||
switch (c)
|
switch (c)
|
||||||
|
|
Loading…
Reference in New Issue