summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-20 16:46:18 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-20 16:46:18 +0000
commit568139e45314dddea8e1d218ea3d61b1235a5b8d (patch)
treecff696dfa377a0cf3e735f28e287645b12baeba7 /gcc/c-opts.c
parente9f0d687a15f6a1864fdf1a3773486e376417233 (diff)
downloadgcc-568139e45314dddea8e1d218ea3d61b1235a5b8d.tar.gz
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
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 8c639cca293..5de5019499b 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -587,7 +587,8 @@ c_common_init_options (lang)
#endif
c_language = lang;
- parse_in = cpp_create_reader (lang == clk_c ? CLK_GNUC89 : CLK_GNUCXX);
+ parse_in = cpp_create_reader (lang == clk_c ? CLK_GNUC89 : CLK_GNUCXX,
+ ident_hash);
cpp_opts = cpp_get_options (parse_in);
if (flag_objc)
cpp_opts->objc = 1;
@@ -1569,7 +1570,7 @@ c_common_post_options (pfilename)
cpp_get_callbacks (parse_in)->file_change = cb_file_change;
/* NOTE: we use in_fname here, not the one supplied. */
- *pfilename = cpp_read_main_file (parse_in, in_fname, ident_hash);
+ *pfilename = cpp_read_main_file (parse_in, in_fname);
saved_lineno = lineno;
lineno = 0;
@@ -1784,10 +1785,10 @@ finish_options ()
{
size_t i;
- cpp_rename_file (parse_in, _("<built-in>"));
+ cpp_change_file (parse_in, LC_RENAME, _("<built-in>"));
cpp_init_builtins (parse_in);
c_cpp_builtins (parse_in);
- cpp_rename_file (parse_in, _("<command line>"));
+ cpp_change_file (parse_in, LC_RENAME, _("<command line>"));
for (i = 0; i < deferred_count; i++)
{
struct deferred_opt *opt = &deferred_opts[i];
@@ -1837,7 +1838,7 @@ push_command_line_include ()
if (include_cursor == deferred_count)
{
/* Restore the line map from <command line>. */
- cpp_rename_file (parse_in, main_input_filename);
+ cpp_change_file (parse_in, LC_RENAME, main_input_filename);
/* -Wunused-macros should only warn about macros defined hereafter. */
cpp_opts->warn_unused_macros = warn_unused_macros;
include_cursor++;