From 568139e45314dddea8e1d218ea3d61b1235a5b8d Mon Sep 17 00:00:00 2001 From: bothner Date: Thu, 20 Mar 2003 16:46:18 +0000 Subject: 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64617 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cppinit.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'gcc/cppinit.c') diff --git a/gcc/cppinit.c b/gcc/cppinit.c index abfcc50eadc..376d72e9e58 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); -- cgit v1.2.1