summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-22 23:18:43 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-22 23:18:43 +0000
commit7a4afb3fb73098908209f1ce953ad6bb8cf72ecc (patch)
tree799a9a1311ed8a193206a711f79a301221abc71d /gcc/c-opts.c
parentd50879bc374e498497960d44d049aa4c121a5b76 (diff)
downloadgcc-7a4afb3fb73098908209f1ce953ad6bb8cf72ecc.tar.gz
2005-03-22 Daniel Berlin <dberlin@dberlin.org>
* c-opts.c (c_common_parse_file): Only start/end main source file if debug hooks says the writer wants it. * dbxout.c (dbx_debug_hooks): Add start_end_main_source_file member. (xcoff_debug_hooks): Ditto. * debug.c (do_nothing_hooks): Ditto. * debug.h (gcc_debug_hooks): Ditto. * dwarf2out.c (dwarf2_debug_hooks): Ditto. * sdbout.c (sdb_debug_hooks): Ditto. * vmsdbgout.c (vmsdbg_debug_hooks): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96902 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 731511ab6ee..42c8236fc03 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -1102,16 +1102,18 @@ c_common_parse_file (int set_yydebug)
i = 0;
for (;;)
{
- /* Start the main input file */
- (*debug_hooks->start_source_file) (0, this_input_filename);
+ /* Start the main input file, if the debug writer wants it. */
+ if (debug_hooks->start_end_main_source_file)
+ (*debug_hooks->start_source_file) (0, this_input_filename);
finish_options ();
pch_init ();
push_file_scope ();
c_parse_file ();
finish_file ();
pop_file_scope ();
- /* And end the main input file. */
- (*debug_hooks->end_source_file) (0);
+ /* And end the main input file, if the debug writer wants it */
+ if (debug_hooks->start_end_main_source_file)
+ (*debug_hooks->end_source_file) (0);
if (++i >= num_in_fnames)
break;
cpp_undef_all (parse_in);