summaryrefslogtreecommitdiff
path: root/gcc/cpppch.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-23 02:22:27 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-23 02:22:27 +0000
commitdbddc5692bdde215cb31cf20518f257a143eaa1e (patch)
tree04a13ceb8485dc1405388eb42a55f0a9c7a8ebbc /gcc/cpppch.c
parente8098a9c387dc5c55b5df2ad3ae677d7d4224759 (diff)
downloadlinaro-gcc-dbddc5692bdde215cb31cf20518f257a143eaa1e.tar.gz
linaro-gcc-dbddc5692bdde215cb31cf20518f257a143eaa1e.tar.bz2
linaro-gcc-dbddc5692bdde215cb31cf20518f257a143eaa1e.zip
* line-map.h (struct line_maps): New field highest_line.
(linemap_position_for_column): Make non-inline function. (LINEMAP_POSITION_FOR_COLUMN): New macro. * line-map.c (linemap_init): Clear highest_line field. (linemap_add): Set highest_line field. (linemap_line_start): Minor optimization - use highest_line field. Reduce maximum column hint to 10000. Update highest_line field. (linemap_position_for_column): Moved from line-map.h. Optimize a bit. * cpphash.h (struct cpp_reader): Remove line field - instead use line_table->highest_line. (saved_line): Remove unused field. (CPP_INCREMENT_FILE): Don't do linemap_lookup - just use newest map. Use line_table's highest_line field instead of cpp_reader's line. * cpplib.c (start_directive): Likewise use highest_line field. (do_line, do_linemarker): Likewise just use newest map. (_cpp_do_file_change): Don't need to set cpp_reader's line field. * cpperror.c (cpp_error): Likewise use highest_line field. * cppfiles.c (open_file_failed: Likewise. (cpp_make_system_header): Likewise use newest map and highest_line. * cppinit.c (cpp_create_reader): Don't initialize removed field. * cpplex.c (_cpp_process_line_notes, _cpp_skip_block_comment, skip_line_comment, skip_whitespace, _cpp_get_fresh_line, _cpp_lex_direct): Likewise use highest_line. (_cpp_lex_direct): Use new LINEMAP_POSITION_FOR_COLUMN macro. * cppmacro.c (_cpp_builtin_macro_text): Likewise use highest_line, and use newest map. * cpppch.c (cpp_read_state): Don't save+restore cpp_reader's line. * cpptrad.c (_cpp_overlay_buffer): Don't save cpp_reader's line. (copy_comment, _cpp_scan_out_logical_line): Likewise use highest_line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpppch.c')
-rw-r--r--gcc/cpppch.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/cpppch.c b/gcc/cpppch.c
index 8cb5bcff87a..815235c6c40 100644
--- a/gcc/cpppch.c
+++ b/gcc/cpppch.c
@@ -618,7 +618,6 @@ cpp_read_state (cpp_reader *r, const char *name, FILE *f,
struct lexer_state old_state;
struct save_macro_item *d;
size_t i, mac_count;
- int saved_line = r->line;
/* Restore spec_nodes, which will be full of references to the old
hashtable entries and so will now be invalid. */
@@ -707,7 +706,6 @@ cpp_read_state (cpp_reader *r, const char *name, FILE *f,
}
r->state = old_state;
- r->line = saved_line;
free (defn);
defn = NULL;