23#include "rich-location.h"
161extern const struct cl_var cl_vars[];
166#define CL_PARAMS (1U << 16)
167#define CL_WARNING (1U << 17)
168#define CL_OPTIMIZATION (1U << 18)
169#define CL_DRIVER (1U << 19)
170#define CL_TARGET (1U << 20)
171#define CL_COMMON (1U << 21)
173#define CL_MIN_OPTION_CLASS CL_PARAMS
174#define CL_MAX_OPTION_CLASS CL_COMMON
181#define CL_JOINED (1U << 22)
182#define CL_SEPARATE (1U << 23)
183#define CL_UNDOCUMENTED (1U << 24)
184#define CL_NO_DWARF_RECORD (1U << 25)
185#define CL_PCH_IGNORE (1U << 26)
188#define CL_ENUM_CANONICAL (1 << 0)
189#define CL_ENUM_DRIVER_ONLY (1 << 1)
190#define CL_ENUM_SET_SHIFT 2
225 void (*
set) (
void *var,
int value);
228 int (*
get) (
const void *var);
238#define CL_ERR_DISABLED (1 << 0)
239#define CL_ERR_MISSING_ARG (1 << 1)
240#define CL_ERR_WRONG_LANG (1 << 2)
241#define CL_ERR_UINT_ARG (1 << 3)
242#define CL_ERR_INT_RANGE_ARG (1 << 4)
243#define CL_ERR_ENUM_ARG (1 << 5)
244#define CL_ERR_NEGATIVE (1 << 6)
247#define CL_ERR_ENUM_SET_ARG (1 << 7)
312 struct gcc_options *opts_set,
314 unsigned int lang_mask,
int kind, location_t loc,
317 void (*target_option_override_hook) (void));
337 unsigned int lang_mask);
368size_t find_opt (
const char *input,
unsigned int lang_mask);
371 const char **argp,
int value,
372 unsigned int lang_mask);
375 unsigned int lang_mask,
377 unsigned int *decoded_options_count);
380 struct gcc_options *opts_set);
385 unsigned int *decoded_options_count);
387 void (*target_option_override_hook) (
void));
389 struct gcc_options *opts_set,
391 unsigned int decoded_options_count,
394 void (*target_option_override_hook) (
void));
395extern int option_enabled (
int opt_idx,
unsigned lang_mask,
void *opts);
399extern void set_option (
struct gcc_options *opts,
400 struct gcc_options *opts_set,
401 size_t opt_index, HOST_WIDE_INT value,
const char *arg,
406 struct gcc_options *opts_set,
407 size_t opt_index,
const char *arg,
409 unsigned int lang_mask,
int kind, location_t loc,
412void generate_option (
size_t opt_index,
const char *arg, HOST_WIDE_INT value,
413 unsigned int lang_mask,
418 struct gcc_options *opts_set,
421 unsigned int lang_mask,
425 const char *arg,
bool imply, location_t loc,
426 unsigned int lang_mask,
428 struct gcc_options *opts,
429 struct gcc_options *opts_set,
436 unsigned int,
int,
bool);
440 struct gcc_options *opts_set,
442 unsigned int lang_mask,
int kind,
446 void (*target_option_override_hook) (
void));
448 struct gcc_options *opts_set,
450 unsigned int lang_mask,
int kind,
454 void (*target_option_override_hook) (
void));
456 struct gcc_options *opts_set,
460extern void print_help (
struct gcc_options *opts,
unsigned int lang_mask,
const
461 char *help_option_argument);
463 struct gcc_options *opts_set,
465 unsigned int decoded_options_count,
467 unsigned int lang_mask,
475 unsigned int lang_mask);
495 const char **out_new_prefix);
499 const char *base_option);
501 const auto_vec <const char *> &
512 HOST_WIDE_INT *patch_area_size,
513 HOST_WIDE_INT *patch_area_start);
521 unsigned int options_count);
524 unsigned int options_count);
528#define SET_OPTION_IF_UNSET(OPTS, OPTS_SET, OPTION, VALUE) \
531 if (!(OPTS_SET)->x_ ## OPTION) \
532 (OPTS)->x_ ## OPTION = VALUE; \
538#define OPTION_SET_P(OPTION) global_options_set.x_ ## OPTION
560#define SWITCH_LIVE (1 << 0)
561#define SWITCH_FALSE (1 << 1)
562#define SWITCH_IGNORE (1 << 2)
563#define SWITCH_IGNORE_PERMANENTLY (1 << 3)
564#define SWITCH_KEEP_FOR_GCC (1 << 4)
Definition diagnostic.h:504
static struct obstack obstack
Definition gcc.cc:360
static options_p option(options_p prev)
Definition gengtype-parse.cc:547
const struct cl_option cl_options[]
cl_enum_var_value
Definition opts.h:57
@ CLEV_BITSET
Definition opts.h:65
@ CLEV_SET
Definition opts.h:62
@ CLEV_NORMAL
Definition opts.h:59
const unsigned int cl_enums_count
unsigned num_in_fnames
Definition opts-global.cc:49
int option_enabled(int opt_idx, unsigned lang_mask, void *opts)
Definition opts-common.cc:1814
void handle_common_deferred_options(void)
Definition opts-global.cc:359
bool get_option_state(struct gcc_options *, int, struct cl_option_state *)
Definition opts-common.cc:1886
void finish_options(struct gcc_options *opts, struct gcc_options *opts_set, location_t loc)
Definition opts.cc:1044
void init_opts_obstack(void)
Definition opts.cc:426
int opt_fstack_limit_register_no
Definition opts-global.cc:353
bool common_handle_option(struct gcc_options *opts, struct gcc_options *opts_set, const struct cl_decoded_option *decoded, unsigned int lang_mask, int kind, location_t loc, const struct cl_option_handlers *handlers, diagnostic_context *dc, void(*target_option_override_hook)(void))
Definition opts.cc:2681
const struct cl_enum cl_enums[]
HOST_WIDE_INT integral_argument(const char *arg, int *=NULL, bool=false)
Definition opts-common.cc:181
void diagnose_options(gcc_options *opts, gcc_options *opts_set, location_t loc)
Definition opts.cc:1484
size_t find_opt(const char *input, unsigned int lang_mask)
Definition opts-common.cc:77
const char * opt_fstack_limit_symbol_arg
Definition opts-global.cc:352
const char ** in_fnames
Definition opts-global.cc:48
void decode_cmdline_options_to_array_default_mask(unsigned int argc, const char **argv, struct cl_decoded_option **decoded_options, unsigned int *decoded_options_count)
Definition opts-global.cc:279
void * option_flag_var(int opt_index, struct gcc_options *opts)
Definition opts-common.cc:1800
void read_cmdline_option(struct gcc_options *opts, struct gcc_options *opts_set, struct cl_decoded_option *decoded, location_t loc, unsigned int lang_mask, const struct cl_option_handlers *handlers, diagnostic_context *dc)
Definition opts-common.cc:1601
void generate_option_input_file(const char *file, struct cl_decoded_option *decoded)
Definition opts-common.cc:1388
void decode_options(struct gcc_options *opts, struct gcc_options *opts_set, struct cl_decoded_option *decoded_options, unsigned int decoded_options_count, location_t loc, diagnostic_context *dc, void(*target_option_override_hook)(void))
Definition opts-global.cc:312
void parse_and_check_patch_area(const char *arg, bool report_error, HOST_WIDE_INT *patch_area_size, HOST_WIDE_INT *patch_area_start)
Definition opts.cc:2480
void set_default_handlers(struct cl_option_handlers *handlers, void(*target_option_override_hook)(void))
Definition opts-global.cc:292
void add_misspelling_candidates(auto_vec< char * > *candidates, const struct cl_option *option, const char *base_option)
Definition opts-common.cc:515
bool flag_stack_protector_set_by_fhardened_p
Definition opts.cc:48
unsigned int parse_no_sanitize_attribute(char *value)
Definition opts.cc:2357
bool opt_enum_arg_to_value(size_t opt_index, const char *arg, int *value, unsigned int lang_mask)
Definition opts-common.cc:325
const char *const lang_names[]
void prepend_xassembler_to_collect_as_options(const char *, obstack *)
Definition opts-common.cc:2066
void set_option(struct gcc_options *opts, struct gcc_options *opts_set, size_t opt_index, HOST_WIDE_INT value, const char *arg, int kind, location_t loc, diagnostic_context *dc, HOST_WIDE_INT=0)
Definition opts-common.cc:1659
cl_var_type
Definition opts.h:27
@ CLVC_BIT_CLEAR
Definition opts.h:35
@ CLVC_BIT_SET
Definition opts.h:38
@ CLVC_ENUM
Definition opts.h:49
@ CLVC_INTEGER
Definition opts.h:29
@ CLVC_DEFER
Definition opts.h:53
@ CLVC_EQUAL
Definition opts.h:32
@ CLVC_STRING
Definition opts.h:45
@ CLVC_SIZE
Definition opts.h:41
const unsigned int cl_lang_count
unsigned int parse_sanitizer_options(const char *, location_t, int, unsigned int, int, bool)
Definition opts.cc:2248
void default_options_optimization(struct gcc_options *opts, struct gcc_options *opts_set, struct cl_decoded_option *decoded_options, unsigned int decoded_options_count, location_t loc, unsigned int lang_mask, const struct cl_option_handlers *handlers, diagnostic_context *dc)
Definition opts.cc:723
void handle_deferred_dump_options(void)
Definition opts-global.cc:507
void set_struct_debug_option(struct gcc_options *opts, location_t loc, const char *value)
Definition opts.cc:205
label_text get_option_url_suffix(int option_index, unsigned lang_mask)
Definition opts.cc:3771
void decode_cmdline_options_to_array(unsigned int argc, const char **argv, unsigned int lang_mask, struct cl_decoded_option **decoded_options, unsigned int *decoded_options_count)
Definition opts-common.cc:1029
const char * get_opt_url_suffix(int option_index, unsigned lang_mask)
char * gen_producer_string(const char *language_string, cl_decoded_option *options, unsigned int options_count)
Definition opts.cc:3926
const unsigned int cl_options_count
bool handle_generated_option(struct gcc_options *opts, struct gcc_options *opts_set, size_t opt_index, const char *arg, HOST_WIDE_INT value, unsigned int lang_mask, int kind, location_t loc, const struct cl_option_handlers *handlers, bool generated_p, diagnostic_context *dc)
Definition opts-common.cc:1334
const char * get_option_prefix_remapping(const char *p, size_t sz, const char **out_new_prefix)
Definition opts-common.cc:477
const struct zero_call_used_regs_opts_s zero_call_used_regs_opts[]
void init_options_once(void)
Definition opts-global.cc:254
const struct sanitizer_opts_s sanitizer_opts[]
void control_warning_option(unsigned int opt_index, int kind, const char *arg, bool imply, location_t loc, unsigned int lang_mask, const struct cl_option_handlers *handlers, struct gcc_options *opts, struct gcc_options *opts_set, diagnostic_context *dc)
Definition opts-common.cc:1939
char * gen_command_line_string(cl_decoded_option *options, unsigned int options_count)
Definition opts.cc:3813
bool target_handle_option(struct gcc_options *opts, struct gcc_options *opts_set, const struct cl_decoded_option *decoded, unsigned int lang_mask, int kind, location_t loc, const struct cl_option_handlers *handlers, diagnostic_context *dc, void(*target_option_override_hook)(void))
Definition opts.cc:365
void init_options_struct(struct gcc_options *opts, struct gcc_options *opts_set)
Definition opts.cc:434
const char * candidates_list_and_hint(const char *arg, char *&str, const auto_vec< const char * > &candidates)
Definition opts-common.cc:1414
void print_ignored_options(void)
Definition opts-global.cc:140
char * opts_concat(const char *first,...)
Definition opts-common.cc:992
void generate_option(size_t opt_index, const char *arg, HOST_WIDE_INT value, unsigned int lang_mask, struct cl_decoded_option *decoded)
Definition opts-common.cc:1353
void print_help(struct gcc_options *opts, unsigned int lang_mask, const char *help_option_argument)
Definition opts.cc:2539
char * write_langs(unsigned int mask)
Definition opts-global.cc:54
bool parse_and_check_align_values(const char *flag, const char *name, auto_vec< unsigned > &result_values, bool report_error, location_t loc)
Definition opts.cc:2410
bool enum_value_to_arg(const struct cl_enum_arg *enum_args, const char **argp, int value, unsigned int lang_mask)
Definition opts-common.cc:351
void parse_options_from_collect_gcc_options(const char *, obstack *, int *)
Definition opts-common.cc:2026
struct obstack opts_obstack
Definition opts-common.cc:987
vec< const char * > help_option_arguments
Definition opts.cc:986
int errors
Definition opts.h:289
const char * arg
Definition opts.h:260
size_t canonical_option_num_elements
Definition opts.h:276
const char * canonical_option[4]
Definition opts.h:272
size_t opt_index
Definition opts.h:253
const char * orig_option_with_args_text
Definition opts.h:266
HOST_WIDE_INT value
Definition opts.h:282
const char * warn_message
Definition opts.h:256
HOST_WIDE_INT mask
Definition opts.h:286
size_t opt_index
Definition opts.h:299
HOST_WIDE_INT value
Definition opts.h:301
const char * arg
Definition opts.h:300
const char * arg
Definition opts.h:197
int value
Definition opts.h:200
unsigned int flags
Definition opts.h:203
const char * help
Definition opts.h:212
const struct cl_enum_arg * values
Definition opts.h:219
const char * unknown_error
Definition opts.h:216
int(* get)(const void *var)
Definition opts.h:228
size_t var_size
Definition opts.h:222
bool(* handler)(struct gcc_options *opts, struct gcc_options *opts_set, const struct cl_decoded_option *decoded, unsigned int lang_mask, int kind, location_t loc, const struct cl_option_handlers *handlers, diagnostic_context *dc, void(*target_option_override_hook)(void))
Definition opts.h:309
unsigned int mask
Definition opts.h:319
struct cl_option_handler_func handlers[3]
Definition opts.h:344
size_t num_handlers
Definition opts.h:341
void(* wrong_lang_callback)(const struct cl_decoded_option *decoded, unsigned int lang_mask)
Definition opts.h:334
void(* target_option_override_hook)(void)
Definition opts.h:338
bool(* unknown_option_callback)(const struct cl_decoded_option *decoded)
Definition opts.h:330
char ch
Definition opts.h:151
const void * data
Definition opts.h:149
size_t size
Definition opts.h:150
BOOL_BITFIELD cl_reject_driver
Definition opts.h:109
BOOL_BITFIELD cl_host_wide_int
Definition opts.h:117
unsigned short alias_target
Definition opts.h:83
unsigned short var_enum
Definition opts.h:127
BOOL_BITFIELD cl_reject_negative
Definition opts.h:111
unsigned short flag_var_offset
Definition opts.h:124
enum cl_var_type var_type
Definition opts.h:129
int range_max
Definition opts.h:135
const char * neg_alias_arg
Definition opts.h:81
BOOL_BITFIELD cl_no_driver_arg
Definition opts.h:107
const char * opt_text
Definition opts.h:71
int neg_index
Definition opts.h:93
BOOL_BITFIELD cl_tolower
Definition opts.h:119
BOOL_BITFIELD cl_missing_ok
Definition opts.h:113
BOOL_BITFIELD cl_separate_alias
Definition opts.h:103
HOST_WIDE_INT var_value
Definition opts.h:131
int range_min
Definition opts.h:133
const char * alias_arg
Definition opts.h:79
BOOL_BITFIELD cl_uinteger
Definition opts.h:115
const char * warn_message
Definition opts.h:77
BOOL_BITFIELD cl_byte_size
Definition opts.h:121
BOOL_BITFIELD cl_disabled
Definition opts.h:97
BOOL_BITFIELD cl_negative_alias
Definition opts.h:105
unsigned char opt_len
Definition opts.h:88
unsigned short back_chain
Definition opts.h:86
unsigned int cl_separate_nargs
Definition opts.h:101
unsigned int flags
Definition opts.h:95
const char * help
Definition opts.h:73
const char * missing_argument_error
Definition opts.h:75
const char * var_name
Definition opts.h:141
unsigned short var_offset
Definition opts.h:143
Definition gengtype.h:179
bool can_recover
Definition opts.h:480
bool can_trap
Definition opts.h:481
unsigned int flag
Definition opts.h:478
const char *const name
Definition opts.h:477
size_t len
Definition opts.h:479
unsigned int live_cond
Definition opts.h:568
const char ** args
Definition opts.h:567
bool validated
Definition opts.h:570
bool ordering
Definition opts.h:571
const char * part1
Definition opts.h:566
bool known
Definition opts.h:569
const char *const name
Definition opts.h:486
unsigned int flag
Definition opts.h:487
#define NULL
Definition system.h:50
#define BOOL_BITFIELD
Definition system.h:896
#define bool
Definition system.h:886
static hash_table< uid_decl_hasher > * candidates
Definition tree-sra.cc:320