diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-08-21 23:05:12 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-08-21 23:05:12 +0000 |
commit | d8693c6fa425fecaf6570114f1cd69aaf3c08043 (patch) | |
tree | e9c81016bacfbc22e38372b7b5b54d1c58bf8dc2 /gcc/cppfiles.c | |
parent | 5993019d2058a2d4ff24b5990ff6d4ac9c8a3311 (diff) | |
download | gcc-d8693c6fa425fecaf6570114f1cd69aaf3c08043.zip gcc-d8693c6fa425fecaf6570114f1cd69aaf3c08043.tar.gz gcc-d8693c6fa425fecaf6570114f1cd69aaf3c08043.tar.bz2 |
cppfiles.c (stack_include_file): line-map.c now handles include depth.
* cppfiles.c (stack_include_file): line-map.c now handles include
depth.
(handle_missing_handler): Similarly.
(_cpp_execute_include): Similarly.
(_cpp_pop_file_buffer): Similarly.
* cpphash.h (struct cpp_reader): Remove system_include_depth,
buffer_stack_depth and include_depth.
* cpplib.c (do_include_common): line-map.c now handles include depth.
(cpp_push_buffer): Similarly.
(_cpp_pop_buffer): Similarly.
* cppmacro.c (builtin_macro): Update.
* line-map.c (init_line_maps): Set depth.
(add_line_map): Increment "used" earlier. Update and use the
include depth.
(trace_include): Use the include depth.
* line-map.h (struct line_maps): New member depth.
From-SVN: r45085
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 1d60d36..c8b28f9 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -324,7 +324,6 @@ stack_include_file (pfile, inc) /* Initialise controlling macro state. */ pfile->mi_valid = true; pfile->mi_cmacro = 0; - pfile->include_depth++; /* Generate the call back. */ filename = inc->name; @@ -614,9 +613,7 @@ handle_missing_header (pfile, fname, angle_brackets) const char *fname; int angle_brackets; { - /* We will try making the RHS pfile->buffer->sysp after 3.0. */ - int print_dep = CPP_PRINT_DEPS(pfile) > (angle_brackets - || pfile->system_include_depth); + int print_dep = CPP_PRINT_DEPS(pfile) > (angle_brackets || pfile->map->sysp); if (CPP_OPTION (pfile, print_deps_missing_files) && print_dep) { @@ -671,9 +668,6 @@ _cpp_execute_include (pfile, header, type) header->type == CPP_HEADER_NAME); else if (inc != NO_INCLUDE_PATH) { - if (header->type == CPP_HEADER_NAME) - pfile->system_include_depth++; - stacked = stack_include_file (pfile, inc); if (type == IT_IMPORT) @@ -734,11 +728,6 @@ _cpp_pop_file_buffer (pfile, buf) { struct include_file *inc = buf->inc; - if (pfile->system_include_depth) - pfile->system_include_depth--; - if (pfile->include_depth) - pfile->include_depth--; - /* Record the inclusion-preventing macro, which could be NULL meaning no controlling macro. */ if (pfile->mi_valid && inc->cmacro == NULL) |