fix-header.c (line_table): Move local variable in main to global.
* fix-header.c (line_table): Move local variable in main to global. * scan.h (line_table): Use it. * scan-decls.c (scan_decls): Need to call linemap_lookup on token's line (recently renamed to src_loc) before calling recognized_function. From-SVN: r77808
This commit is contained in:
parent
cb7c0b5a3e
commit
c7762b449d
@ -1,3 +1,10 @@
|
||||
2004-02-14 Per Bothner <per@bothner.com>
|
||||
|
||||
* fix-header.c (line_table): Move local variable in main to global.
|
||||
* scan.h (line_table): Use it.
|
||||
* scan-decls.c (scan_decls): Need to call linemap_lookup on token's
|
||||
line (recently renamed to src_loc) before calling recognized_function.
|
||||
|
||||
2004-02-14 Matt Kraai <kraai@alumni.cmu.edu>
|
||||
|
||||
* Makefile.in: Fix comment typos.
|
||||
|
@ -84,6 +84,8 @@ static void v_fatal (const char *, va_list)
|
||||
ATTRIBUTE_PRINTF (1,0) ATTRIBUTE_NORETURN;
|
||||
static void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
|
||||
|
||||
struct line_maps line_table;
|
||||
|
||||
sstring buf;
|
||||
|
||||
int verbose = 0;
|
||||
@ -590,7 +592,6 @@ read_scan_file (char *in_fname, int argc, char **argv)
|
||||
struct fn_decl *fn;
|
||||
int i, strings_processed;
|
||||
struct symbol_list *cur_symbols;
|
||||
struct line_maps line_table;
|
||||
|
||||
obstack_init (&scan_file_obstack);
|
||||
|
||||
|
@ -165,6 +165,8 @@ scan_decls (cpp_reader *pfile, int argc ATTRIBUTE_UNUSED,
|
||||
{
|
||||
int nesting = 1;
|
||||
int have_arg_list = 0;
|
||||
const struct line_map *map;
|
||||
unsigned int line;
|
||||
for (;;)
|
||||
{
|
||||
token = get_a_token (pfile);
|
||||
@ -182,7 +184,9 @@ scan_decls (cpp_reader *pfile, int argc ATTRIBUTE_UNUSED,
|
||||
|| token->type == CPP_ELLIPSIS)
|
||||
have_arg_list = 1;
|
||||
}
|
||||
recognized_function (&prev_id, token->line,
|
||||
map = linemap_lookup (&line_table, token->src_loc);
|
||||
line = SOURCE_LINE (map, token->src_loc);
|
||||
recognized_function (&prev_id, line,
|
||||
(saw_inline ? 'I'
|
||||
: in_extern_C_brace || current_extern_C
|
||||
? 'F' : 'f'), have_arg_list);
|
||||
|
@ -70,3 +70,5 @@ extern int source_lineno;
|
||||
extern sstring source_filename;
|
||||
/* Current physical line number */
|
||||
extern int lineno;
|
||||
|
||||
extern struct line_maps line_table;
|
||||
|
Loading…
Reference in New Issue
Block a user