diff options
Diffstat (limited to 'gcc/c-pch.c')
-rw-r--r-- | gcc/c-pch.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/gcc/c-pch.c b/gcc/c-pch.c index 821eddba088..27a299ffd3e 100644 --- a/gcc/c-pch.c +++ b/gcc/c-pch.c @@ -68,10 +68,6 @@ pch_init () if (pch_file) { - /* We're precompiling a header file, so when it's actually used, - it'll be at least one level deep. */ - (*debug_hooks->start_source_file) (lineno, input_filename); - f = fopen (pch_file, "w+b"); if (f == NULL) fatal_io_error ("can't open %s", pch_file); @@ -88,6 +84,9 @@ pch_init () asm_file_startpos = ftell (asm_out_file); + /* Let the debugging format deal with the PCHness. */ + (*debug_hooks->handle_pch) (0); + cpp_save_state (parse_in, f); } } @@ -100,6 +99,8 @@ c_common_write_pch () long written; struct c_pch_header h; + (*debug_hooks->handle_pch) (1); + cpp_write_pch_deps (parse_in, pch_outfile); asm_file_end = ftell (asm_out_file); @@ -195,7 +196,7 @@ c_common_read_pch (pfile, name, fd, orig_name) cpp_reader *pfile; const char *name; int fd; - const char *orig_name; + const char *orig_name ATTRIBUTE_UNUSED; { FILE *f; struct c_pch_header h; @@ -203,10 +204,6 @@ c_common_read_pch (pfile, name, fd, orig_name) unsigned long written; struct save_macro_data *smd; - /* Before we wrote the file, we started a source file, so we have to start - one here to match. */ - (*debug_hooks->start_source_file) (lineno, orig_name); - f = fdopen (fd, "rb"); if (f == NULL) { @@ -243,6 +240,4 @@ c_common_read_pch (pfile, name, fd, orig_name) return; fclose (f); - - (*debug_hooks->end_source_file) (lineno); } |