/* The current line map. */
static const struct line_map *map;
-/* The line used to refresh the lineno global variable after each token. */
-static unsigned int src_lineno;
-
/* We may keep statistics about how long which files took to compile. */
static int header_time, body_time;
static splay_tree file_info_tree;
if (token->type == CPP_EOF || parsing_args)
return;
- src_lineno = SOURCE_LINE (map, token->line);
+ input_line = SOURCE_LINE (map, token->line);
}
static void
void
fe_file_change (const struct line_map *new_map)
{
+ if (new_map == NULL)
+ {
+ map = NULL;
+ return;
+ }
+
if (new_map->reason == LC_ENTER)
{
/* Don't stack the main buffer on the input stack;
while (tok->type == CPP_PADDING);
timevar_pop (TV_CPP);
- /* The C++ front end does horrible things with the current line
- number. To ensure an accurate line number, we must reset it
- every time we advance a token. */
- input_line = src_lineno;
-
return tok;
}