diff options
author | David Malcolm <dmalcolm@redhat.com> | 2023-11-16 08:29:19 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2023-11-16 08:29:19 -0500 |
commit | 4547c271c455dcf54ce9c4bb820acdd3b6193f6d (patch) | |
tree | 48481e00f2fefbf6d1493e2a07ef2142f81133c9 /gcc/toplev.cc | |
parent | 7a496b7ce105185be12e023e749c90d5f7561879 (diff) | |
download | gcc-4547c271c455dcf54ce9c4bb820acdd3b6193f6d.zip gcc-4547c271c455dcf54ce9c4bb820acdd3b6193f6d.tar.gz gcc-4547c271c455dcf54ce9c4bb820acdd3b6193f6d.tar.bz2 |
diagnostics: make m_lang_mask private
No functional change intended.
gcc/ChangeLog:
* diagnostic.cc (diagnostic_context::set_option_hooks): Add
"lang_mask" param.
* diagnostic.h (diagnostic_context::option_enabled_p): Update for
move of m_lang_mask.
(diagnostic_context::set_option_hooks): Add "lang_mask" param.
(diagnostic_context::get_lang_mask): New.
(diagnostic_context::m_lang_mask): Move into m_option_callbacks,
thus making private.
* lto-wrapper.cc (main): Update for new lang_mask param of
set_option_hooks.
* toplev.cc (init_asm_output): Use get_lang_mask.
(general_init): Move initialization of global_dc's lang_mask to
new lang_mask param of set_option_hooks.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/toplev.cc')
-rw-r--r-- | gcc/toplev.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/toplev.cc b/gcc/toplev.cc index ae2f3d5..8c3fcd3 100644 --- a/gcc/toplev.cc +++ b/gcc/toplev.cc @@ -715,7 +715,7 @@ init_asm_output (const char *name) "cannot open %qs for writing: %m", asm_file_name); } - if (!flag_syntax_only && !(global_dc->m_lang_mask & CL_LTODump)) + if (!flag_syntax_only && !(global_dc->get_lang_mask () & CL_LTODump)) { targetm.asm_out.file_start (); @@ -1020,7 +1020,6 @@ general_init (const char *argv0, bool init_signals) /* Initialize the diagnostics reporting machinery, so option parsing can give warnings and errors. */ diagnostic_initialize (global_dc, N_OPTS); - global_dc->m_lang_mask = lang_hooks.option_lang_mask (); /* Set a default printer. Language specific initializations will override it later. */ tree_diagnostics_defaults (global_dc); @@ -1048,7 +1047,8 @@ general_init (const char *argv0, bool init_signals) global_dc->set_option_hooks (option_enabled, &global_options, option_name, - get_option_url); + get_option_url, + lang_hooks.option_lang_mask ()); global_dc->set_urlifier (make_gcc_urlifier ()); if (init_signals) |