diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-05-11 21:54:51 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-05-11 21:54:51 +0200 |
commit | 9d000e830050e5157a159b531c1f6a564e7fff29 (patch) | |
tree | 7bb635018e1b3e22b38eb5e19c237eca0aeb4fea /gcc/c-opts.c | |
parent | f6430ea53c7b591d4064ff583b9621aa999ad814 (diff) | |
download | gcc-9d000e830050e5157a159b531c1f6a564e7fff29.zip gcc-9d000e830050e5157a159b531c1f6a564e7fff29.tar.gz gcc-9d000e830050e5157a159b531c1f6a564e7fff29.tar.bz2 |
c-opts.c (c_common_parse_file): If start_end_main_source_file, don't call start_source_file debug hook here...
* c-opts.c (c_common_parse_file): If start_end_main_source_file,
don't call start_source_file debug hook here...
(finish_options): ... but here, after outputting predefined and
command line defines and undefs.
From-SVN: r159293
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r-- | gcc/c-opts.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c index b721157..d57cf91 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1388,9 +1388,6 @@ c_common_parse_file (int set_yydebug) i = 0; for (;;) { - /* 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 (); @@ -1649,6 +1646,11 @@ finish_options (void) } } + /* Start the main input file, if the debug writer wants it. */ + if (debug_hooks->start_end_main_source_file + && !flag_preprocess_only) + (*debug_hooks->start_source_file) (0, this_input_filename); + /* Handle -imacros after -D and -U. */ for (i = 0; i < deferred_count; i++) { @@ -1663,8 +1665,16 @@ finish_options (void) } } } - else if (cpp_opts->directives_only) - cpp_init_special_builtins (parse_in); + else + { + if (cpp_opts->directives_only) + cpp_init_special_builtins (parse_in); + + /* Start the main input file, if the debug writer wants it. */ + if (debug_hooks->start_end_main_source_file + && !flag_preprocess_only) + (*debug_hooks->start_source_file) (0, this_input_filename); + } include_cursor = 0; push_command_line_include (); |