Mercurial > hg > CbC > CbC_gcc
comparison gcc/opts.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Command line option handling. | 1 /* Command line option handling. |
2 Copyright (C) 2002-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2002-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 6 GCC is free software; you can redistribute it and/or modify it under |
7 the terms of the GNU General Public License as published by the Free | 7 the terms of the GNU General Public License as published by the Free |
33 /* The switch is enabled when VAR_VALUE is not set in FLAG_VAR. */ | 33 /* The switch is enabled when VAR_VALUE is not set in FLAG_VAR. */ |
34 CLVC_BIT_CLEAR, | 34 CLVC_BIT_CLEAR, |
35 | 35 |
36 /* The switch is enabled when VAR_VALUE is set in FLAG_VAR. */ | 36 /* The switch is enabled when VAR_VALUE is set in FLAG_VAR. */ |
37 CLVC_BIT_SET, | 37 CLVC_BIT_SET, |
38 | |
39 /* The switch is enabled when FLAG_VAR is less than HOST_WIDE_INT_M1U. */ | |
40 CLVC_SIZE, | |
38 | 41 |
39 /* The switch takes a string argument and FLAG_VAR points to that | 42 /* The switch takes a string argument and FLAG_VAR points to that |
40 argument. */ | 43 argument. */ |
41 CLVC_STRING, | 44 CLVC_STRING, |
42 | 45 |
68 /* Previous option that is an initial substring of this one, or | 71 /* Previous option that is an initial substring of this one, or |
69 N_OPTS if none. */ | 72 N_OPTS if none. */ |
70 unsigned short back_chain; | 73 unsigned short back_chain; |
71 /* Option length, not including initial '-'. */ | 74 /* Option length, not including initial '-'. */ |
72 unsigned char opt_len; | 75 unsigned char opt_len; |
73 /* Next option in a sequence marked with Negative, or -1 if none. */ | 76 /* Next option in a sequence marked with Negative, or -1 if none. |
77 For a single option with both a negative and a positve form | |
78 (such as -Wall and -Wno-all), NEG_IDX is equal to the option's | |
79 own index (i.e., cl_options[IDX].neg_idx == IDX holds). */ | |
74 int neg_index; | 80 int neg_index; |
75 /* CL_* flags for this option. */ | 81 /* CL_* flags for this option. */ |
76 unsigned int flags; | 82 unsigned int flags; |
77 /* Disabled in this configuration. */ | 83 /* Disabled in this configuration. */ |
78 BOOL_BITFIELD cl_disabled : 1; | 84 BOOL_BITFIELD cl_disabled : 1; |
98 BOOL_BITFIELD cl_host_wide_int : 1; | 104 BOOL_BITFIELD cl_host_wide_int : 1; |
99 /* Argument should be converted to lowercase. */ | 105 /* Argument should be converted to lowercase. */ |
100 BOOL_BITFIELD cl_tolower : 1; | 106 BOOL_BITFIELD cl_tolower : 1; |
101 /* Report argument with -fverbose-asm */ | 107 /* Report argument with -fverbose-asm */ |
102 BOOL_BITFIELD cl_report : 1; | 108 BOOL_BITFIELD cl_report : 1; |
109 /* Argument is an unsigned integer with an optional byte suffix. */ | |
110 BOOL_BITFIELD cl_byte_size: 1; | |
103 /* Offset of field for this option in struct gcc_options, or | 111 /* Offset of field for this option in struct gcc_options, or |
104 (unsigned short) -1 if none. */ | 112 (unsigned short) -1 if none. */ |
105 unsigned short flag_var_offset; | 113 unsigned short flag_var_offset; |
106 /* Index in cl_enums of enum used for this option's arguments, for | 114 /* Index in cl_enums of enum used for this option's arguments, for |
107 CLVC_ENUM options. */ | 115 CLVC_ENUM options. */ |
242 size_t canonical_option_num_elements; | 250 size_t canonical_option_num_elements; |
243 | 251 |
244 /* For a boolean option, 1 for the true case and 0 for the "no-" | 252 /* For a boolean option, 1 for the true case and 0 for the "no-" |
245 case. For an unsigned integer option, the value of the | 253 case. For an unsigned integer option, the value of the |
246 argument. 1 in all other cases. */ | 254 argument. 1 in all other cases. */ |
247 int value; | 255 HOST_WIDE_INT value; |
248 | 256 |
249 /* Any flags describing errors detected in this option. */ | 257 /* Any flags describing errors detected in this option. */ |
250 int errors; | 258 int errors; |
251 }; | 259 }; |
252 | 260 |
322 /* Obstack for option strings. */ | 330 /* Obstack for option strings. */ |
323 | 331 |
324 extern struct obstack opts_obstack; | 332 extern struct obstack opts_obstack; |
325 | 333 |
326 size_t find_opt (const char *input, unsigned int lang_mask); | 334 size_t find_opt (const char *input, unsigned int lang_mask); |
327 extern int integral_argument (const char *arg); | 335 extern HOST_WIDE_INT integral_argument (const char *arg, int * = NULL, bool = false); |
328 extern bool enum_value_to_arg (const struct cl_enum_arg *enum_args, | 336 extern bool enum_value_to_arg (const struct cl_enum_arg *enum_args, |
329 const char **argp, int value, | 337 const char **argp, int value, |
330 unsigned int lang_mask); | 338 unsigned int lang_mask); |
331 extern void decode_cmdline_options_to_array (unsigned int argc, | 339 extern void decode_cmdline_options_to_array (unsigned int argc, |
332 const char **argv, | 340 const char **argv, |
354 extern int option_enabled (int opt_idx, void *opts); | 362 extern int option_enabled (int opt_idx, void *opts); |
355 extern bool get_option_state (struct gcc_options *, int, | 363 extern bool get_option_state (struct gcc_options *, int, |
356 struct cl_option_state *); | 364 struct cl_option_state *); |
357 extern void set_option (struct gcc_options *opts, | 365 extern void set_option (struct gcc_options *opts, |
358 struct gcc_options *opts_set, | 366 struct gcc_options *opts_set, |
359 int opt_index, int value, const char *arg, int kind, | 367 int opt_index, HOST_WIDE_INT value, const char *arg, |
360 location_t loc, diagnostic_context *dc); | 368 int kind, location_t loc, diagnostic_context *dc); |
361 extern void *option_flag_var (int opt_index, struct gcc_options *opts); | 369 extern void *option_flag_var (int opt_index, struct gcc_options *opts); |
362 bool handle_generated_option (struct gcc_options *opts, | 370 bool handle_generated_option (struct gcc_options *opts, |
363 struct gcc_options *opts_set, | 371 struct gcc_options *opts_set, |
364 size_t opt_index, const char *arg, int value, | 372 size_t opt_index, const char *arg, |
373 HOST_WIDE_INT value, | |
365 unsigned int lang_mask, int kind, location_t loc, | 374 unsigned int lang_mask, int kind, location_t loc, |
366 const struct cl_option_handlers *handlers, | 375 const struct cl_option_handlers *handlers, |
367 bool generated_p, diagnostic_context *dc); | 376 bool generated_p, diagnostic_context *dc); |
368 void generate_option (size_t opt_index, const char *arg, int value, | 377 void generate_option (size_t opt_index, const char *arg, HOST_WIDE_INT value, |
369 unsigned int lang_mask, | 378 unsigned int lang_mask, |
370 struct cl_decoded_option *decoded); | 379 struct cl_decoded_option *decoded); |
371 void generate_option_input_file (const char *file, | 380 void generate_option_input_file (const char *file, |
372 struct cl_decoded_option *decoded); | 381 struct cl_decoded_option *decoded); |
373 extern void read_cmdline_option (struct gcc_options *opts, | 382 extern void read_cmdline_option (struct gcc_options *opts, |
420 diagnostic_context *dc); | 429 diagnostic_context *dc); |
421 extern void set_struct_debug_option (struct gcc_options *opts, | 430 extern void set_struct_debug_option (struct gcc_options *opts, |
422 location_t loc, | 431 location_t loc, |
423 const char *value); | 432 const char *value); |
424 extern bool opt_enum_arg_to_value (size_t opt_index, const char *arg, | 433 extern bool opt_enum_arg_to_value (size_t opt_index, const char *arg, |
425 int *value, unsigned int lang_mask); | 434 int *value, |
435 unsigned int lang_mask); | |
426 | 436 |
427 extern const struct sanitizer_opts_s | 437 extern const struct sanitizer_opts_s |
428 { | 438 { |
429 const char *const name; | 439 const char *const name; |
430 unsigned int flag; | 440 unsigned int flag; |
437 const char *base_option); | 447 const char *base_option); |
438 extern const char *candidates_list_and_hint (const char *arg, char *&str, | 448 extern const char *candidates_list_and_hint (const char *arg, char *&str, |
439 const auto_vec <const char *> & | 449 const auto_vec <const char *> & |
440 candidates); | 450 candidates); |
441 | 451 |
452 | |
453 extern bool parse_and_check_align_values (const char *flag, | |
454 const char *name, | |
455 auto_vec<unsigned> &result_values, | |
456 bool report_error, | |
457 location_t loc); | |
458 | |
442 #endif | 459 #endif |