aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-08-21 21:17:48 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-08-21 21:17:48 +0000
commit5993019d2058a2d4ff24b5990ff6d4ac9c8a3311 (patch)
tree2dfd14ccaad28936c874d7de1b8e61b3d1be6abd /gcc/cppinit.c
parente5eba70ac7f7e76bbc784eee6191e7464694dba1 (diff)
downloadgcc-5993019d2058a2d4ff24b5990ff6d4ac9c8a3311.zip
gcc-5993019d2058a2d4ff24b5990ff6d4ac9c8a3311.tar.gz
gcc-5993019d2058a2d4ff24b5990ff6d4ac9c8a3311.tar.bz2
cppfiles.c (stack_include_file): Don't handle -H here.
* cppfiles.c (stack_include_file): Don't handle -H here. * cppinit.c (cpp_start_read): Set include tracing after cpp_post_options and after stacking the main file. * line-map.c (trace_include): New. (init_line_maps, add_line_map): Update. * line-map.h (struct line_maps): New member trace_includes. From-SVN: r45084
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 0c4aa01..b57910c 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -939,6 +939,11 @@ cpp_start_read (pfile, fname)
if (!_cpp_read_file (pfile, fname))
return 0;
+ /* Set this after cpp_post_options so the client can change the
+ option if it wishes, and after stacking the main file so we don't
+ trace the main file. */
+ pfile->line_maps.trace_includes = CPP_OPTION (pfile, print_include_names);
+
/* Install builtins and process command line macros etc. in the order
they appeared, but only if not already preprocessed. */
if (! CPP_OPTION (pfile, preprocessed))