comparison gcc/opts.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Command line option handling. 1 /* Command line option handling.
2 Copyright (C) 2002-2018 Free Software Foundation, Inc. 2 Copyright (C) 2002-2020 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
343 unsigned int *decoded_options_count); 343 unsigned int *decoded_options_count);
344 extern void init_options_once (void); 344 extern void init_options_once (void);
345 extern void init_options_struct (struct gcc_options *opts, 345 extern void init_options_struct (struct gcc_options *opts,
346 struct gcc_options *opts_set); 346 struct gcc_options *opts_set);
347 extern void init_opts_obstack (void); 347 extern void init_opts_obstack (void);
348 extern void finalize_options_struct (struct gcc_options *opts);
349 extern void decode_cmdline_options_to_array_default_mask (unsigned int argc, 348 extern void decode_cmdline_options_to_array_default_mask (unsigned int argc,
350 const char **argv, 349 const char **argv,
351 struct cl_decoded_option **decoded_options, 350 struct cl_decoded_option **decoded_options,
352 unsigned int *decoded_options_count); 351 unsigned int *decoded_options_count);
353 extern void set_default_handlers (struct cl_option_handlers *handlers, 352 extern void set_default_handlers (struct cl_option_handlers *handlers,
357 struct cl_decoded_option *decoded_options, 356 struct cl_decoded_option *decoded_options,
358 unsigned int decoded_options_count, 357 unsigned int decoded_options_count,
359 location_t loc, 358 location_t loc,
360 diagnostic_context *dc, 359 diagnostic_context *dc,
361 void (*target_option_override_hook) (void)); 360 void (*target_option_override_hook) (void));
362 extern int option_enabled (int opt_idx, void *opts); 361 extern int option_enabled (int opt_idx, unsigned lang_mask, void *opts);
362
363 extern bool get_option_state (struct gcc_options *, int, 363 extern bool get_option_state (struct gcc_options *, int,
364 struct cl_option_state *); 364 struct cl_option_state *);
365 extern void set_option (struct gcc_options *opts, 365 extern void set_option (struct gcc_options *opts,
366 struct gcc_options *opts_set, 366 struct gcc_options *opts_set,
367 int opt_index, HOST_WIDE_INT value, const char *arg, 367 int opt_index, HOST_WIDE_INT value, const char *arg,
417 diagnostic_context *dc, 417 diagnostic_context *dc,
418 void (*target_option_override_hook) (void)); 418 void (*target_option_override_hook) (void));
419 extern void finish_options (struct gcc_options *opts, 419 extern void finish_options (struct gcc_options *opts,
420 struct gcc_options *opts_set, 420 struct gcc_options *opts_set,
421 location_t loc); 421 location_t loc);
422 extern void print_help (struct gcc_options *opts, unsigned int lang_mask, const
423 char *help_option_argument);
422 extern void default_options_optimization (struct gcc_options *opts, 424 extern void default_options_optimization (struct gcc_options *opts,
423 struct gcc_options *opts_set, 425 struct gcc_options *opts_set,
424 struct cl_decoded_option *decoded_options, 426 struct cl_decoded_option *decoded_options,
425 unsigned int decoded_options_count, 427 unsigned int decoded_options_count,
426 location_t loc, 428 location_t loc,
440 unsigned int flag; 442 unsigned int flag;
441 size_t len; 443 size_t len;
442 bool can_recover; 444 bool can_recover;
443 } sanitizer_opts[]; 445 } sanitizer_opts[];
444 446
447 extern vec<const char *> help_option_arguments;
448
445 extern void add_misspelling_candidates (auto_vec<char *> *candidates, 449 extern void add_misspelling_candidates (auto_vec<char *> *candidates,
446 const struct cl_option *option, 450 const struct cl_option *option,
447 const char *base_option); 451 const char *base_option);
448 extern const char *candidates_list_and_hint (const char *arg, char *&str, 452 extern const char *candidates_list_and_hint (const char *arg, char *&str,
449 const auto_vec <const char *> & 453 const auto_vec <const char *> &
454 const char *name, 458 const char *name,
455 auto_vec<unsigned> &result_values, 459 auto_vec<unsigned> &result_values,
456 bool report_error, 460 bool report_error,
457 location_t loc); 461 location_t loc);
458 462
463 /* Set OPTION in OPTS to VALUE if the option is not set in OPTS_SET. */
464
465 #define SET_OPTION_IF_UNSET(OPTS, OPTS_SET, OPTION, VALUE) \
466 do \
467 { \
468 if (!(OPTS_SET)->x_ ## OPTION) \
469 (OPTS)->x_ ## OPTION = VALUE; \
470 } \
471 while (false)
472
459 #endif 473 #endif