diff options
author | Per Bothner <pbothner@apple.com> | 2003-03-20 16:46:18 +0000 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2003-03-20 08:46:18 -0800 |
commit | b4e46cea24515316b941bfacae8417c078fc5701 (patch) | |
tree | cff696dfa377a0cf3e735f28e287645b12baeba7 /gcc/cppfiles.c | |
parent | 8826ff0fcd12a506e2e91df9e4cae05747b88f13 (diff) | |
download | gcc-b4e46cea24515316b941bfacae8417c078fc5701.zip gcc-b4e46cea24515316b941bfacae8417c078fc5701.tar.gz gcc-b4e46cea24515316b941bfacae8417c078fc5701.tar.bz2 |
Various cleanups to help compile server.
* cppinit.c (cpp_create_reader): Take extra hash_table* argument,
and pass that to _cpp_init_hashtable.
(cpp_read_main_file): Drop hash_table* argument; don't call
_cpp_init_hashtable.
* cpplib.h: Update declarations to match.
* c-opts.c (c_common_init_options): Pass ident_hash to
cpp_create_reader.
(c_common_post_options): Don't pass ident_hash to cpp_read_main_file.
* fix-header.c (read_scan_file): Likewise pass NULL table to
cpp_create_reader rather than cpp_read_main_file.
* cppfiles.c (cpp_rename_file): Generalized and renamed
to cpp_change_file.
* cpplib.h: Update declaration to match.
* c-opts.c (push_command_line_line, finish_options): Change
cpp_rename_file calls to cpp_change_file.
From-SVN: r64617
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 9bcdb9e..1ff34ff 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -756,14 +756,16 @@ cpp_make_system_header (pfile, syshdr, externc) SOURCE_LINE (pfile->map, pfile->line), flags); } -/* Allow the client to rename the current file. Used by the front end - to achieve pseudo-file names like <built-in>. */ +/* Allow the client to change the current file. Used by the front end + to achieve pseudo-file names like <built-in>. + If REASON is LC_LEAVE, then NEW_NAME must be NULL. */ void -cpp_rename_file (pfile, new_name) +cpp_change_file (pfile, reason, new_name) cpp_reader *pfile; + enum lc_reason reason; const char *new_name; { - _cpp_do_file_change (pfile, LC_RENAME, new_name, 1, 0); + _cpp_do_file_change (pfile, reason, new_name, 1, 0); } /* Report on all files that might benefit from a multiple include guard. |