GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "intl.h"
#include "coretypes.h"
#include "opts.h"
#include "options.h"
#include "diagnostic.h"
#include "spellcheck.h"
#include "opts-jobserver.h"
Data Structures | |
struct | option_map |
Macros | |
#define | INCLUDE_STRING |
Functions | |
static void | prune_options (struct cl_decoded_option **, unsigned int *) |
static bool | remapping_prefix_p (const struct cl_option *opt) |
size_t | find_opt (const char *input, unsigned int lang_mask) |
HOST_WIDE_INT | integral_argument (const char *arg, int *err, bool byte_size_suffix) |
static bool | option_ok_for_language (const struct cl_option *option, unsigned int lang_mask) |
static bool | enum_arg_ok_for_language (const struct cl_enum_arg *enum_arg, unsigned int lang_mask) |
static int | enum_arg_to_value (const struct cl_enum_arg *enum_args, const char *arg, size_t len, HOST_WIDE_INT *value, unsigned int lang_mask) |
bool | opt_enum_arg_to_value (size_t opt_index, const char *arg, int *value, unsigned int lang_mask) |
bool | enum_value_to_arg (const struct cl_enum_arg *enum_args, const char **argp, int value, unsigned int lang_mask) |
static void | generate_canonical_option (size_t opt_index, const char *arg, HOST_WIDE_INT value, struct cl_decoded_option *decoded) |
const char * | get_option_prefix_remapping (const char *p, size_t sz, const char **out_new_prefix) |
void | add_misspelling_candidates (auto_vec< char * > *candidates, const struct cl_option *option, const char *opt_text) |
static unsigned int | decode_cmdline_option (const char *const *argv, unsigned int lang_mask, struct cl_decoded_option *decoded) |
char * | opts_concat (const char *first,...) |
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) |
static bool | cancel_option (int opt_idx, int next_opt_idx, int orig_next_opt_idx) |
static bool | 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, bool generated_p, diagnostic_context *dc) |
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) |
void | generate_option (size_t opt_index, const char *arg, HOST_WIDE_INT value, unsigned int lang_mask, struct cl_decoded_option *decoded) |
void | generate_option_input_file (const char *file, struct cl_decoded_option *decoded) |
const char * | candidates_list_and_hint (const char *arg, char *&str, const auto_vec< const char * > &candidates) |
static bool | cmdline_handle_error (location_t loc, const struct cl_option *option, const char *opt, const char *arg, int errors, unsigned int lang_mask) |
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) |
void | set_option (struct gcc_options *opts, struct gcc_options *opts_set, int opt_index, HOST_WIDE_INT value, const char *arg, int kind, location_t loc, diagnostic_context *dc, HOST_WIDE_INT mask) |
void * | option_flag_var (int opt_index, struct gcc_options *opts) |
int | option_enabled (int opt_idx, unsigned lang_mask, void *opts) |
bool | get_option_state (struct gcc_options *opts, int option, struct cl_option_state *state) |
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) |
void | parse_options_from_collect_gcc_options (const char *collect_gcc_options, obstack *argv_obstack, int *argc_p) |
void | prepend_xassembler_to_collect_as_options (const char *collect_as_options, obstack *o) |
Variables | |
static const struct option_map | option_map [] |
struct obstack | opts_obstack |
#define INCLUDE_STRING |
Command line option handling. Copyright (C) 2006-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
void add_misspelling_candidates | ( | auto_vec< char * > * | candidates, |
const struct cl_option * | option, | ||
const char * | opt_text ) |
Helper function for gcc.cc's driver::suggest_option, for populating the vec of suggestions for misspelled options. option_map above provides various prefixes for spelling command-line options, which decode_cmdline_option uses to map spellings of options to specific options. We want to do the reverse: to find all the ways that a user could validly spell an option. Given valid OPT_TEXT (with a leading dash) for OPTION, add it and all of its valid variant spellings to CANDIDATES, each without a leading dash. For example, given "-Wabi-tag", the following are added to CANDIDATES: "Wabi-tag" "Wno-abi-tag" "-warn-abi-tag" "-warn-no-abi-tag". The added strings must be freed using free.
References candidates, gcc_assert, i, option_map::negated, option_map::new_prefix, NULL, option_map::opt0, option_map::opt1, option(), and remapping_prefix_p().
Referenced by option_proposer::build_option_suggestions().
|
static |
Return true if NEXT_OPT_IDX cancels OPT_IDX. Return false if the next one is the same as ORIG_NEXT_OPT_IDX.
References cancel_option(), and cl_options.
Referenced by cancel_option(), and prune_options().
const char * candidates_list_and_hint | ( | const char * | arg, |
char *& | str, | ||
const auto_vec< const char * > & | candidates ) |
Helper function for listing valid choices and hint for misspelled value. CANDIDATES is a vector containing all valid strings, STR is set to a heap allocated string that contains all those strings concatenated, separated by spaces, and the return value is the closest string from those to ARG, or NULL if nothing is close enough. Callers should XDELETEVEC (STR) after using it to avoid memory leaks.
References candidate(), candidates, find_closest_string(), FOR_EACH_VEC_ELT, gcc_assert, and i.
Referenced by check_offload_target_name(), and cmdline_handle_error().
|
static |
Perform diagnostics for read_cmdline_option and control_warning_option functions. Returns true if an error has been diagnosed. LOC and LANG_MASK arguments like in read_cmdline_option. OPTION is the option to report diagnostics for, OPT the name of the option as text, ARG the argument of the option (for joined options), ERRORS is bitmask of CL_ERR_* values.
References cl_enum_arg::arg, candidates, candidates_list_and_hint(), CL_ENUM_SET_SHIFT, cl_enums, CL_ERR_DISABLED, CL_ERR_ENUM_ARG, CL_ERR_ENUM_SET_ARG, CL_ERR_INT_RANGE_ARG, CL_ERR_MISSING_ARG, CL_ERR_UINT_ARG, CLEV_BITSET, enum_arg_ok_for_language(), enum_arg_to_value(), error_at(), cl_enum_arg::flags, gcc_checking_assert, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_1U, i, inform(), NULL, option(), cl_enum::unknown_error, and cl_enum::values.
Referenced by control_warning_option(), and read_cmdline_option().
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 ) |
Set a warning option OPT_INDEX (language mask LANG_MASK, option handlers HANDLERS) to have diagnostic kind KIND for option structures OPTS and OPTS_SET and diagnostic context DC (possibly NULL), at location LOC (UNKNOWN_LOCATION for -Werror=). ARG is the argument of the option for joined options, or NULL otherwise. If IMPLY, the warning option in question is implied at this point. This is used by -Werror= and #pragma GCC diagnostic.
References cl_option::alias_arg, cl_option::alias_target, cl_enums, CL_ERR_ENUM_ARG, CL_ERR_MISSING_ARG, CL_ERR_UINT_ARG, CL_JOINED, cl_options, CLVC_ENUM, CLVC_INTEGER, CLVC_SIZE, cmdline_handle_error(), diagnostic_classify_diagnostic(), enum_arg_to_value(), enum_value_to_arg(), error(), gcc_assert, handle_generated_option(), integral_argument(), NULL, option(), and cl_enum::values.
Referenced by common_handle_option(), and enable_warning_as_error().
|
static |
Decode the switch beginning at ARGV for the language indicated by LANG_MASK (including CL_COMMON and CL_TARGET if applicable), into the structure *DECODED. Returns the number of switches consumed.
References cl_option::alias_target, option_map::another_char_needed, cl_decoded_option::arg, cl_enum_arg::arg, cl_decoded_option::canonical_option, cl_decoded_option::canonical_option_num_elements, CL_DRIVER, CL_ENUM_SET_SHIFT, cl_enums, CL_ERR_DISABLED, CL_ERR_ENUM_ARG, CL_ERR_ENUM_SET_ARG, CL_ERR_INT_RANGE_ARG, CL_ERR_MISSING_ARG, CL_ERR_NEGATIVE, CL_ERR_UINT_ARG, CL_ERR_WRONG_LANG, CL_JOINED, cl_options, CL_SEPARATE, cl_option::cl_separate_alias, CLEV_BITSET, CLEV_NORMAL, CLEV_SET, CLVC_ENUM, CLVC_SIZE, enum_arg_to_value(), enum_value_to_arg(), error(), cl_decoded_option::errors, find_opt(), cl_enum_arg::flags, free(), gcc_assert, gcc_checking_assert, generate_canonical_option(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_1U, i, integral_argument(), cl_decoded_option::mask, option_map::negated, option_map::new_prefix, NULL, option_map::opt0, option_map::opt1, cl_decoded_option::opt_index, cl_option::opt_len, option(), option_ok_for_language(), opts_obstack, cl_decoded_option::orig_option_with_args_text, cl_option::range_min, cl_decoded_option::value, cl_enum_arg::value, cl_enum::values, cl_decoded_option::warn_message, and cl_option::warn_message.
Referenced by decode_cmdline_options_to_array().
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 ) |
Decode command-line options (ARGC and ARGV being the arguments of main) into an array, setting *DECODED_OPTIONS to a pointer to that array and *DECODED_OPTIONS_COUNT to the number of entries in the array. The first entry in the array is always one for the program name (OPT_SPECIAL_program_name). LANG_MASK indicates the language flags applicable for decoding (including CL_COMMON and CL_TARGET if those options should be considered applicable). Do not produce any diagnostics or set state outside of these variables.
References cl_decoded_option::arg, cl_decoded_option::canonical_option, cl_decoded_option::canonical_option_num_elements, decode_cmdline_option(), cl_decoded_option::errors, generate_option_input_file(), i, cl_decoded_option::mask, NULL, cl_decoded_option::opt_index, opts_concat(), cl_decoded_option::orig_option_with_args_text, prune_options(), cl_decoded_option::value, and cl_decoded_option::warn_message.
Referenced by driver::decode_argv(), decode_cmdline_options_to_array_default_mask(), do_self_spec(), and get_options_from_collect_gcc_options().
|
static |
Return whether ENUM_ARG is OK for the language given by LANG_MASK.
References CL_DRIVER, CL_ENUM_DRIVER_ONLY, and cl_enum_arg::flags.
Referenced by cmdline_handle_error(), enum_arg_to_value(), and enum_value_to_arg().
|
static |
Look up ARG in ENUM_ARGS for language LANG_MASK, returning the cl_enum_arg index and storing the value in *VALUE if found, and returning -1 without modifying *VALUE if not found.
References cl_enum_arg::arg, enum_arg_ok_for_language(), i, NULL, and cl_enum_arg::value.
Referenced by cmdline_handle_error(), control_warning_option(), decode_cmdline_option(), and opt_enum_arg_to_value().
bool enum_value_to_arg | ( | const struct cl_enum_arg * | enum_args, |
const char ** | argp, | ||
int | value, | ||
unsigned int | lang_mask ) |
Look of VALUE in ENUM_ARGS for language LANG_MASK and store the corresponding string in *ARGP, returning true if the found string was marked as canonical, false otherwise. If VALUE is not found (which may be the case for uninitialized values if the relevant option has not been passed), set *ARGP to NULL and return false.
References cl_enum_arg::arg, CL_ENUM_CANONICAL, enum_arg_ok_for_language(), cl_option::flags, i, and NULL.
Referenced by control_warning_option(), decode_cmdline_option(), and print_filtered_help().
size_t find_opt | ( | const char * | input, |
unsigned int | lang_mask ) |
Perform a binary search to find which option the command-line INPUT matches. Returns its index in the option array, and OPT_SPECIAL_unknown on failure. This routine is quite subtle. A normal binary search is not good enough because some options can be suffixed with an argument, and multiple sub-matches can occur, e.g. input of "-pedantic" matching the initial substring of "-pedantic-errors". A more complicated example is -gstabs. It should match "-g" with an argument of "stabs". Suppose, however, that the number and list of switches are such that the binary search tests "-gen-decls" before having tested "-g". This doesn't match, and as "-gen-decls" is less than "-gstabs", it will become the lower bound of the binary search range, and "-g" will never be seen. To resolve this issue, 'optc-gen.awk' makes "-gen-decls" point, via the back_chain member, to "-g" so that failed searches that end between "-gen-decls" and the lexicographically subsequent switch know to go back and see if "-g" causes a match (which it does in this example). This search is done in such a way that the longest match for the front end in question wins. If there is no match for the current front end, the longest match for a different front end is returned (or N_OPTS if none) and the caller emits an error message.
References cl_option::back_chain, CL_JOINED, cl_options, cl_options_count, comp, cl_option::flags, cl_option::opt_len, cl_option::opt_text, and remapping_prefix_p().
Referenced by decode_cmdline_option(), and enable_warning_as_error().
|
static |
Fill in the canonical option part of *DECODED with an option described by OPT_INDEX, ARG and VALUE.
References cl_decoded_option::canonical_option, cl_decoded_option::canonical_option_num_elements, CL_JOINED, cl_options, CL_SEPARATE, gcc_assert, NULL, cl_option::opt_text, option(), opts_concat(), and opts_obstack.
Referenced by decode_cmdline_option(), and generate_option().
void generate_option | ( | size_t | opt_index, |
const char * | arg, | ||
HOST_WIDE_INT | value, | ||
unsigned int | lang_mask, | ||
struct cl_decoded_option * | decoded ) |
Fill in *DECODED with an option described by OPT_INDEX, ARG and VALUE for a front end using LANG_MASK. This is used when the compiler generates options internally.
References cl_decoded_option::arg, cl_decoded_option::canonical_option, cl_decoded_option::canonical_option_num_elements, CL_ERR_WRONG_LANG, cl_options, cl_decoded_option::errors, gcc_unreachable, generate_canonical_option(), cl_decoded_option::mask, NULL, cl_decoded_option::opt_index, option(), option_ok_for_language(), opts_concat(), cl_decoded_option::orig_option_with_args_text, cl_decoded_option::value, and cl_decoded_option::warn_message.
Referenced by handle_generated_option().
void generate_option_input_file | ( | const char * | file, |
struct cl_decoded_option * | decoded ) |
Fill in *DECODED with an option for input file FILE.
References cl_decoded_option::arg, cl_decoded_option::canonical_option, cl_decoded_option::canonical_option_num_elements, cl_decoded_option::errors, cl_decoded_option::mask, NULL, cl_decoded_option::opt_index, cl_decoded_option::orig_option_with_args_text, cl_decoded_option::value, and cl_decoded_option::warn_message.
Referenced by decode_cmdline_options_to_array().
const char * get_option_prefix_remapping | ( | const char * | p, |
size_t | sz, | ||
const char ** | out_new_prefix ) |
Given buffer P of size SZ, look for a prefix within OPTION_MAP; if found, return the prefix and write the new prefix to *OUT_NEW_PREFIX. Otherwise return nullptr.
References i, option_map::new_prefix, and option_map::opt0.
bool get_option_state | ( | struct gcc_options * | opts, |
int | option, | ||
struct cl_option_state * | state ) |
Fill STATE with the current state of option OPTION in OPTS. Return true if there is some state to store.
References cl_enums, cl_option::cl_host_wide_int, cl_options, CLVC_BIT_CLEAR, CLVC_BIT_SET, CLVC_DEFER, CLVC_ENUM, CLVC_EQUAL, CLVC_INTEGER, CLVC_SIZE, CLVC_STRING, option(), option_enabled(), option_flag_var(), cl_option::var_enum, and cl_enum::var_size.
Referenced by option_affects_pch_p().
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 ) |
Like handle_option, but OPT_INDEX, ARG and VALUE describe the option instead of DECODED. This is used for callbacks when one option implies another instead of an option being decoded from the command line.
References cl_decoded_option::arg, generate_option(), handle_option(), cl_decoded_option::opt_index, and cl_decoded_option::value.
Referenced by control_warning_option(), and maybe_default_option().
|
static |
Handle option DECODED for the language indicated by LANG_MASK, using the handlers in HANDLERS and setting fields in OPTS and OPTS_SET. KIND is the diagnostic_t if this is a diagnostics option, DK_UNSPECIFIED otherwise, and LOC is the location of the option for options from the source file, UNKNOWN_LOCATION otherwise. GENERATED_P is true for an option generated as part of processing another option or otherwise generated internally, false for one explicitly passed by the user. control_warning_option generated options are considered explicitly passed by the user. Returns false if the switch was invalid. DC is the diagnostic context for options affecting diagnostics state, or NULL.
References cl_decoded_option::arg, cl_options, cl_option_handler_func::handler, cl_option_handlers::handlers, i, cl_decoded_option::mask, cl_option_handler_func::mask, NULL, cl_option_handlers::num_handlers, cl_decoded_option::opt_index, option(), option_flag_var(), set_option(), cl_option_handlers::target_option_override_hook, and cl_decoded_option::value.
Referenced by handle_generated_option(), and read_cmdline_option().
HOST_WIDE_INT integral_argument | ( | const char * | arg, |
int * | err, | ||
bool | byte_size_suffix ) |
If ARG is a non-negative decimal or hexadecimal integer representable in HOST_WIDE_INT return its value, otherwise return -1. If ERR is not null set *ERR to zero on success or to EINVAL or to the value of errno otherwise.
References end(), errno, HOST_WIDE_INT_M1U, HOST_WIDE_INT_UC, and NULL.
Referenced by control_warning_option(), decode_cmdline_option(), default_options_optimization(), parse_and_check_patch_area(), and set_debug_level().
bool opt_enum_arg_to_value | ( | size_t | opt_index, |
const char * | arg, | ||
int * | value, | ||
unsigned int | lang_mask ) |
Look up ARG in the enum used by option OPT_INDEX for language LANG_MASK, returning true and storing the value in *VALUE if found, and returning false without modifying *VALUE if not found.
References cl_enums, cl_options, CLVC_ENUM, enum_arg_to_value(), gcc_assert, option(), and cl_enum::values.
int option_enabled | ( | int | opt_idx, |
unsigned | lang_mask, | ||
void * | opts ) |
Return 1 if option OPT_IDX is enabled in OPTS, 0 if it is disabled, or -1 if it isn't a simple on-off switch (or if the value is unknown, typically set later in target).
References CL_COMMON, cl_options, CLVC_BIT_CLEAR, CLVC_BIT_SET, CLVC_DEFER, CLVC_ENUM, CLVC_EQUAL, CLVC_INTEGER, CLVC_SIZE, CLVC_STRING, option(), and option_flag_var().
Referenced by general_init(), get_option_state(), print_filtered_help(), and suggest_attribute().
void * option_flag_var | ( | int | opt_index, |
struct gcc_options * | opts ) |
Return the address of the flag variable for option OPT_INDEX in options structure OPTS, or NULL if there is no flag variable.
References cl_options, NULL, and option().
Referenced by common_handle_option(), get_option_state(), handle_option(), option_affects_pch_p(), option_enabled(), print_filtered_help(), and set_option().
|
static |
Return whether OPTION is OK for the language given by LANG_MASK.
References CL_COMMON, CL_DRIVER, CL_TARGET, and option().
Referenced by decode_cmdline_option(), and generate_option().
char * opts_concat | ( | const char * | first, |
... ) |
Like libiberty concat, but allocate using opts_obstack.
References ap, end(), and opts_obstack.
Referenced by decode_cmdline_options_to_array(), finish_options(), generate_canonical_option(), and generate_option().
void parse_options_from_collect_gcc_options | ( | const char * | collect_gcc_options, |
obstack * | argv_obstack, | ||
int * | argc_p ) |
Parse options in COLLECT_GCC_OPTIONS and push them on ARGV_OBSTACK. Store number of arguments into ARGC_P.
References fatal_error(), input_location, NULL, and startswith().
Referenced by get_options_from_collect_gcc_options(), and prepend_xassembler_to_collect_as_options().
void prepend_xassembler_to_collect_as_options | ( | const char * | collect_as_options, |
obstack * | o ) |
Prepend -Xassembler for each option in COLLECT_AS_OPTIONS, and push on O.
References i, obstack, opts_obstack, and parse_options_from_collect_gcc_options().
Referenced by lto_write_options(), and run_gcc().
|
static |
Filter out options canceled by the ones after them, and related rearrangement.
References cancel_option(), CL_ERR_WRONG_LANG, CL_JOINED, cl_options, cl_options_count, cl_option::cl_reject_negative, cl_option::flags, free(), gcc_assert, gcc_checking_assert, i, cl_option::neg_index, cl_decoded_option::opt_index, and option().
Referenced by decode_cmdline_options_to_array().
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 ) |
Handle the switch DECODED (location LOC) for the language indicated by LANG_MASK, using the handlers in *HANDLERS and setting fields in OPTS and OPTS_SET and using diagnostic context DC (if not NULL) for diagnostic options.
References cl_decoded_option::arg, CL_ERR_WRONG_LANG, cl_options, cmdline_handle_error(), error_at(), cl_decoded_option::errors, gcc_assert, handle_option(), cl_decoded_option::opt_index, option(), cl_decoded_option::orig_option_with_args_text, cl_option_handlers::unknown_option_callback, cl_decoded_option::value, cl_decoded_option::warn_message, warning_at(), and cl_option_handlers::wrong_lang_callback.
Referenced by do_self_spec(), process_command(), and read_cmdline_options().
An option that is undocumented, that takes a joined argument, and that doesn't fit any of the classes of uses (language/common, driver, target) is assumed to be a prefix used to catch e.g. negated options, and stop them from being further shortened to a prefix that could use the negated option as an argument. For example, we want -gno-statement-frontiers to be taken as a negation of -gstatement-frontiers, but without catching the gno- prefix and signaling it's to be used for option remapping, it would end up backtracked to g with no-statemnet-frontiers as the debug level.
References CL_COMMON, CL_DRIVER, CL_JOINED, CL_TARGET, CL_UNDOCUMENTED, and cl_option::flags.
Referenced by add_misspelling_candidates(), and find_opt().
void set_option | ( | struct gcc_options * | opts, |
struct gcc_options * | opts_set, | ||
int | opt_index, | ||
HOST_WIDE_INT | value, | ||
const char * | arg, | ||
int | kind, | ||
location_t | loc, | ||
diagnostic_context * | dc, | ||
HOST_WIDE_INT | mask ) |
Set any field in OPTS, and OPTS_SET if not NULL, for option OPT_INDEX according to VALUE and ARG, diagnostic kind KIND, location LOC, using diagnostic context DC if not NULL for diagnostic classification.
References cl_enums, cl_options, CLVC_BIT_CLEAR, CLVC_BIT_SET, CLVC_DEFER, CLVC_ENUM, CLVC_EQUAL, CLVC_INTEGER, CLVC_SIZE, CLVC_STRING, diagnostic_classify_diagnostic(), error_at(), cl_enum::get, INT_MAX, NULL, option(), option_flag_var(), and cl_enum::set.
Referenced by handle_option().
|
static |
struct obstack opts_obstack |
Obstack for option strings.
Referenced by decode_cmdline_option(), driver_get_configure_time_options(), driver::finalize(), toplev::finalize(), generate_canonical_option(), init_options_struct(), init_opts_obstack(), opts_concat(), and prepend_xassembler_to_collect_as_options().