diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-05 21:15:57 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-05 21:15:57 +0000 |
commit | e7aa92b2a1d420c944ff0c2e0ed5f0240638fa39 (patch) | |
tree | b7f8db5c8aee0a49ffa5b4f9b148561a8a68a233 /gcc/cpplib.h | |
parent | 52fa96d362090ae55361c6c2f18a284ffa384927 (diff) | |
download | gcc-e7aa92b2a1d420c944ff0c2e0ed5f0240638fa39.tar.gz |
* c.opt: Introduce -fworking-directory.
* doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it.
* c-common.h (flag_working_directory): Declare.
* c-common.c (flag_working_directory): Define.
* c-opts.c (c_common_handle_options): Set it.
(sanitize_cpp_opts): Set...
* cpplib.h (struct cpp_options): ... working_directory option.
(struct cpp_callbacks): Add dir_change.
* cppinit.c (read_original_filename): Call...
(read_original_directory): New. Look for # 1 "directory//"
and process it.
(cpp_read_main_file): Call dir_change callback if working_directory
option is set.
* gcc.c (cpp_unique_options): Pass -g*.
* c-lex.c (cb_dir_change): New.
(init_c_lex): Set dir_change callback.
* toplev.c (src_pwd): New static variable.
(set_src_pwd, get_src_pwd): New functions.
* toplev.h (get_src_pwd, set_src_pwd): Declare.
* dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd().
* dwarf2out.c (gen_compile_unit_die): Likewise.
* dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70189 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index ca3f81422ad..57fc0b13086 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -370,6 +370,11 @@ struct cpp_options /* Nonzero means __STDC__ should have the value 0 in system headers. */ unsigned char stdc_0_in_system_headers; + + /* Nonzero means output a directory line marker right after the + initial file name line marker, and before a duplicate initial + line marker. */ + bool working_directory; }; /* Call backs to cpplib client. */ @@ -378,6 +383,7 @@ struct cpp_callbacks /* Called when a new line of preprocessed output is started. */ void (*line_change) (cpp_reader *, const cpp_token *, int); void (*file_change) (cpp_reader *, const struct line_map *); + void (*dir_change) (cpp_reader *, const char *); void (*include) (cpp_reader *, unsigned int, const unsigned char *, const char *, int); void (*define) (cpp_reader *, unsigned int, cpp_hashnode *); |