GCC Middle and Back End API Reference
|
#include "langhooks.h"
Typedefs | |
typedef const char * | const_char_p |
Functions | |
static char * | write_langs () |
static void | complain_wrong_lang (const struct cl_decoded_option *decoded, unsigned int lang_mask) |
static void | postpone_unknown_option_warning () |
void | print_ignored_options () |
static bool | unknown_option_callback () |
static bool | lang_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) |
static void | add_input_filename () |
static void | read_cmdline_options (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) |
static void | dump_remap_tree_vectorizer_verbose () |
void | init_options_once () |
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) |
void | set_default_handlers () |
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 | handle_common_deferred_options () |
Variables | |
static vec< const_char_p > | ignored_options |
const char ** | in_fnames |
unsigned | num_in_fnames |
static unsigned int | initial_lang_mask |
typedef const char* const_char_p |
@verbatim Command line option handling. Code involving global state that
should not be shared with the driver. Copyright (C) 2002-2013 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/.
|
static |
Handle FILENAME from the command line.
References in_fnames, and num_in_fnames.
Referenced by read_cmdline_options().
|
static |
Complain that switch DECODED does not apply to this front end (mask LANG_MASK).
References cl_lang_count, cl_options, lang_hooks::complain_wrong_lang_p, error(), cl_option::flags, free(), cl_decoded_option::opt_index, option(), cl_decoded_option::orig_option_with_args_text, warning(), and write_langs().
Referenced by set_default_handlers().
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 | ||
) |
Decode command-line options to an array, like decode_cmdline_options_to_array and with the same arguments but using the default lang_mask.
References decode_cmdline_options_to_array(), and initial_lang_mask.
Referenced by toplev_main().
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 | ||
) |
Parse command line options and set default flag values. Do minimal options processing. The decoded options are in *DECODED_OPTIONS and *DECODED_OPTIONS_COUNT; settings go in OPTS, OPTS_SET and DC; the options are located at LOC.
References default_options_optimization(), finish_options(), initial_lang_mask, read_cmdline_options(), and set_default_handlers().
Referenced by toplev_main().
|
static |
Handle -ftree-vectorizer-verbose=ARG by remapping it to -fopt-info. It remaps the old verbosity values as following: REPORT_NONE ==> No dump is output REPORT_VECTORIZED_LOCATIONS ==> "-optimized" REPORT_UNVECTORIZED_LOCATIONS ==> "-missed" Any higher verbosity levels get mapped to "-all" flags.
References opt_info_switch_p().
Referenced by handle_common_deferred_options().
void handle_common_deferred_options | ( | void | ) |
Process common options that have been deferred until after the handlers have been called for all options.
References add_debug_prefix_map(), add_new_plugin(), cl_deferred_option::arg, dbg_cnt_list_all_counters(), dbg_cnt_process_opt(), decode_reg_name(), disable_pass(), dump_remap_tree_vectorizer_verbose(), dump_switch_p(), enable_pass(), enable_rtl_dump_file(), error(), fix_register(), gen_rtx_REG(), cl_deferred_option::opt_index, opt_info_switch_p(), parse_plugin_arg_opt(), set_random_seed(), stack_limit_rtx, cl_deferred_option::value, and vNULL.
Referenced by toplev_main().
void init_options_once | ( | void | ) |
Initialize global options-related settings at start-up.
References global_dc, initial_lang_mask, lang_hooks::initialize_diagnostics, and lang_hooks::option_lang_mask.
Referenced by toplev_main().
|
static |
Handle a front-end option; arguments and return value as for handle_option.
References cl_decoded_option::arg, cl_decoded_option::canonical_option_num_elements, global_dc, lang_hooks::handle_option, cl_decoded_option::opt_index, and cl_decoded_option::value.
Referenced by set_default_handlers().
|
static |
Buffer the unknown option described by the string OPT. Currently, we only complain about unknown -Wno-* options if they may have prevented a diagnostic. Otherwise, we just ignore them. Note that if we do complain, it is only as a warning, not an error; passing the compiler an unrecognised -Wno-* option should never change whether the compilation succeeds or fails.
Referenced by unknown_option_callback().
void print_ignored_options | ( | void | ) |
Produce a warning for each option previously buffered.
References warning_at().
Referenced by toplev_main().
|
static |
Handle the vector of command line options (located at LOC), storing the results of processing DECODED_OPTIONS and DECODED_OPTIONS_COUNT in OPTS and OPTS_SET and using DC for diagnostic state. LANG_MASK contains has a single bit set representing the current language. HANDLERS describes what functions to call for the options.
References add_input_filename(), cl_decoded_option::arg, base_of_path(), and read_cmdline_option().
Referenced by decode_options().
void set_default_handlers | ( | ) |
Set *HANDLERS to the default set of option handlers for use in the compilers proper (not the driver).
References common_handle_option(), complain_wrong_lang(), cl_option_handler_func::handler, cl_option_handlers::handlers, initial_lang_mask, lang_handle_option(), cl_option_handler_func::mask, cl_option_handlers::num_handlers, target_handle_option(), unknown_option_callback(), cl_option_handlers::unknown_option_callback, and cl_option_handlers::wrong_lang_callback.
Referenced by decode_options().
|
static |
Handle an unknown option DECODED, returning true if an error should be given.
References cl_decoded_option::arg, cl_decoded_option::errors, and postpone_unknown_option_warning().
Referenced by set_default_handlers().
|
static |
Return a malloced slash-separated list of languages in MASK.
References lang_names, len, and strlen().
Referenced by complain_wrong_lang().
|
static |
const char** in_fnames |
Input file names.
Referenced by add_input_filename().
|
static |
Language mask determined at initialization.
Referenced by decode_cmdline_options_to_array_default_mask(), decode_options(), init_options_once(), and set_default_handlers().
unsigned num_in_fnames |
The count of input filenames.
Referenced by add_input_filename().