Commit f66409e0 by Jakub Jelinek Committed by Jakub Jelinek

opts.h (finish_options): Remove lang_mask argument.

	* opts.h (finish_options): Remove lang_mask argument.
	(print_help, help_option_argument): Declare.
	* opts.c (print_help): Remove forward declaration, no longer static.
	(finish_options): Remove lang_mask argument, don't call print_help
	here.
	* opts-global.c (decode_options): Adjust finish_option caller, call
	print_help here.

From-SVN: r270836
parent d1700aa1
2019-05-03 Jakub Jelinek <jakub@redhat.com> 2019-05-03 Jakub Jelinek <jakub@redhat.com>
* opts.h (finish_options): Remove lang_mask argument.
(print_help, help_option_argument): Declare.
* opts.c (print_help): Remove forward declaration, no longer static.
(finish_options): Remove lang_mask argument, don't call print_help
here.
* opts-global.c (decode_options): Adjust finish_option caller, call
print_help here.
PR tree-optimization/90303 PR tree-optimization/90303
* ipa-devirt.c (obj_type_ref_class, get_odr_type): Don't use * ipa-devirt.c (obj_type_ref_class, get_odr_type): Don't use
TYPE_CANONICAL for TYPE_STRUCTURAL_EQUALITY_P types in !in_lto_p mode. TYPE_CANONICAL for TYPE_STRUCTURAL_EQUALITY_P types in !in_lto_p mode.
......
...@@ -314,7 +314,11 @@ decode_options (struct gcc_options *opts, struct gcc_options *opts_set, ...@@ -314,7 +314,11 @@ decode_options (struct gcc_options *opts, struct gcc_options *opts_set,
loc, lang_mask, loc, lang_mask,
&handlers, dc); &handlers, dc);
finish_options (opts, opts_set, loc, lang_mask); finish_options (opts, opts_set, loc);
/* Print --help=* if used. */
if (help_option_argument != NULL)
print_help (opts, lang_mask);
} }
/* Hold command-line options associated with stack limitation. */ /* Hold command-line options associated with stack limitation. */
......
...@@ -858,15 +858,13 @@ control_options_for_live_patching (struct gcc_options *opts, ...@@ -858,15 +858,13 @@ control_options_for_live_patching (struct gcc_options *opts,
/* --help option argument if set. */ /* --help option argument if set. */
const char *help_option_argument = NULL; const char *help_option_argument = NULL;
static void print_help (struct gcc_options *opts, unsigned int lang_mask);
/* After all options at LOC have been read into OPTS and OPTS_SET, /* After all options at LOC have been read into OPTS and OPTS_SET,
finalize settings of those options and diagnose incompatible finalize settings of those options and diagnose incompatible
combinations. */ combinations. */
void void
finish_options (struct gcc_options *opts, struct gcc_options *opts_set, finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
location_t loc, unsigned int lang_mask) location_t loc)
{ {
enum unwind_info_type ui_except; enum unwind_info_type ui_except;
...@@ -1230,10 +1228,6 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, ...@@ -1230,10 +1228,6 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
opts->x_flag_live_patching, opts->x_flag_live_patching,
loc); loc);
} }
/* Print --help=* if used. */
if (help_option_argument != NULL)
print_help (opts, lang_mask);
} }
#define LEFT_COLUMN 27 #define LEFT_COLUMN 27
...@@ -2066,7 +2060,7 @@ check_alignment_argument (location_t loc, const char *flag, const char *name) ...@@ -2066,7 +2060,7 @@ check_alignment_argument (location_t loc, const char *flag, const char *name)
/* Print help when OPT__help_ is set. */ /* Print help when OPT__help_ is set. */
static void void
print_help (struct gcc_options *opts, unsigned int lang_mask) print_help (struct gcc_options *opts, unsigned int lang_mask)
{ {
const char *a = help_option_argument; const char *a = help_option_argument;
......
...@@ -418,8 +418,8 @@ extern bool target_handle_option (struct gcc_options *opts, ...@@ -418,8 +418,8 @@ extern bool target_handle_option (struct gcc_options *opts,
void (*target_option_override_hook) (void)); void (*target_option_override_hook) (void));
extern void finish_options (struct gcc_options *opts, extern void finish_options (struct gcc_options *opts,
struct gcc_options *opts_set, struct gcc_options *opts_set,
location_t loc, location_t loc);
unsigned int lang_mask); extern void print_help (struct gcc_options *opts, unsigned int lang_mask);
extern void default_options_optimization (struct gcc_options *opts, extern void default_options_optimization (struct gcc_options *opts,
struct gcc_options *opts_set, struct gcc_options *opts_set,
struct cl_decoded_option *decoded_options, struct cl_decoded_option *decoded_options,
...@@ -443,6 +443,8 @@ extern const struct sanitizer_opts_s ...@@ -443,6 +443,8 @@ extern const struct sanitizer_opts_s
bool can_recover; bool can_recover;
} sanitizer_opts[]; } sanitizer_opts[];
extern const char *help_option_argument;
extern void add_misspelling_candidates (auto_vec<char *> *candidates, extern void add_misspelling_candidates (auto_vec<char *> *candidates,
const struct cl_option *option, const struct cl_option *option,
const char *base_option); const char *base_option);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment