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/cppinit.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/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index abfcc50..376d72e 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -132,8 +132,9 @@ init_library () /* Initialize a cpp_reader structure. */ cpp_reader * -cpp_create_reader (lang) +cpp_create_reader (lang, table) enum c_lang lang; + hash_table *table; { cpp_reader *pfile; @@ -199,6 +200,8 @@ cpp_create_reader (lang) _cpp_init_includes (pfile); + _cpp_init_hashtable (pfile, table); + return pfile; } @@ -429,20 +432,14 @@ cpp_add_dependency_target (pfile, target, quote) or stdin if it is the empty string. Return the original filename on success (e.g. foo.i->foo.c), or NULL on failure. */ const char * -cpp_read_main_file (pfile, fname, table) +cpp_read_main_file (pfile, fname) cpp_reader *pfile; const char *fname; - hash_table *table; { sanity_checks (pfile); post_options (pfile); - /* The front ends don't set up the hash table until they have - finished processing the command line options, so initializing the - hashtable is deferred until now. */ - _cpp_init_hashtable (pfile, table); - /* Mark named operators before handling command line macros. */ if (CPP_OPTION (pfile, cplusplus) && CPP_OPTION (pfile, operator_names)) mark_named_operators (pfile); |