aboutsummaryrefslogtreecommitdiff
path: root/gcc/line-map.h
diff options
context:
space:
mode:
authorNeil Booth <neil@cat.daikokuya.demon.co.uk>2001-08-04 12:01:59 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-08-04 12:01:59 +0000
commitef6e958a8611ff372211d0fd3cd9659614583bb4 (patch)
tree0aaaf48e2153d5621bc68cb09f9c0d2ef9a3854a /gcc/line-map.h
parent03997728b499f76a20356705aa4d05d808ab9c3c (diff)
downloadgcc-ef6e958a8611ff372211d0fd3cd9659614583bb4.zip
gcc-ef6e958a8611ff372211d0fd3cd9659614583bb4.tar.gz
gcc-ef6e958a8611ff372211d0fd3cd9659614583bb4.tar.bz2
Makefile.in (CPPLIB_H): New, so that dependencies on cpplib.h are also on line-map.h.
* Makefile.in (CPPLIB_H): New, so that dependencies on cpplib.h are also on line-map.h. * cppfiles.c (stack_include_file): Update. * cpphash.h (struct cpp_buffer): New member return_at_eof. (_cpp_pop_buffer): New. * cppinit.c (cpp_destroy, cpp_finish): Update. (do_includes): Mark each buffer to return at EOF. * cpplex.c (_cpp_lex_token): Pop buffers at EOF. Continue or return as requested. * cpplib.c (run_directive, do_line, cpp_push_buffer): Update. (cpp_pop_buffer): Rename _cpp_pop_buffer. Stop skipping. * cpplib.h (cpp_pop_buffer): Remove. (cpp_scan_buffer_nooutput): Rename cpp_scan_nooutput. * cppmacro.c (cpp_scan_buffer_nooutput): Similarly. No need to pop buffers. * cppmain.c (scan_buffer): Rename scan_translation_unit. No need to pop buffers. (do_preprocessing): Update. * fix-header.c (read_scan_file): Update. No need to pop buffers. * c-parse.in (_yylex): Similarly. * scan-decls.c (scan_decls): Similarly. * line-map.h: Update comments. * cp/spew.c (read_token): No need to pop buffers. * objc/Make-lang.in (objc-act.o): Update dependencies. From-SVN: r44634
Diffstat (limited to 'gcc/line-map.h')
-rw-r--r--gcc/line-map.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/line-map.h b/gcc/line-map.h
index fe5e3cc..1f9a47d 100644
--- a/gcc/line-map.h
+++ b/gcc/line-map.h
@@ -25,7 +25,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* The logical line FROM_LINE maps to physical source file TO_FILE at
line TO_LINE, and subsequently one-to-one until the next line_map
- structure in the set. */
+ structure in the set. INCLUDED_FROM is an index into the set that
+ gives the line mapping at whose end the current one was included.
+ File(s) at the bottom of the include stack have this set to -1. */
struct line_map
{
const char *to_file;
@@ -34,7 +36,7 @@ struct line_map
int included_from;
};
-/* Contains a sequence of chronological line_map structures. */
+/* A set of chronological line_map structures. */
struct line_maps
{
struct line_map *maps;
@@ -75,6 +77,7 @@ extern struct line_map *lookup_line
of the #include, or other directive, that caused a map change. */
#define LAST_SOURCE_LINE(MAP) SOURCE_LINE (MAP, (MAP)[1].from_line - 1)
+/* Non-zero if the map is at the bottom of the include stack. */
#define MAIN_FILE_P(MAP) ((MAP)->included_from < 0)
#endif /* !GCC_LINE_MAP_H */