GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "diagnostic.h"
#include "opts.h"
#include "flags.h"
#include "ggc.h"
#include "tree.h"
#include "gimple.h"
#include "langhooks.h"
#include "tm.h"
#include "rtl.h"
#include "dbgcnt.h"
#include "debug.h"
#include "lto-streamer.h"
#include "output.h"
#include "plugin.h"
#include "toplev.h"
#include "tree-pass.h"
#include "context.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 |
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.
Referenced by read_cmdline_options().
|
static |
Complain that switch DECODED does not apply to this front end (mask LANG_MASK).
Eventually this should become a hard error IMO.
References cl_lang_count.
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.
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.
|
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.
void handle_common_deferred_options | ( | void | ) |
Process common options that have been deferred until after the handlers have been called for all options.
Deferred.
The real switch is -fno-random-seed.
The real switch is -fno-stack-limit.
References stack_limit_rtx.
void init_options_once | ( | void | ) |
Initialize global options-related settings at start-up.
Perform language-specific options initialization.
References CL_COMMON, CL_TARGET, and decode_cmdline_options_to_array().
|
static |
Handle a front-end option; arguments and return value as for handle_option.
|
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.
void print_ignored_options | ( | void | ) |
Produce a warning for each option previously buffered.
|
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.
Input files should only ever appear on the main command line.
References add_input_filename(), cl_decoded_option::arg, base_of_path(), gcc_assert, and NULL.
Referenced by set_default_handlers().
void set_default_handlers | ( | ) |
Set *HANDLERS to the default set of option handlers for use in the compilers proper (not the driver).
References default_options_optimization(), initial_lang_mask, and read_cmdline_options().
|
static |
Handle an unknown option DECODED, returning true if an error should be given.
We don't generate warnings for unknown -Wno-* options unless we issue diagnostics.
|
static |
Return a malloced slash-separated list of languages in MASK.
References lang_names.
|
static |
const char** in_fnames |
Input file names.
|
static |
Language mask determined at initialization.
Referenced by set_default_handlers().
unsigned num_in_fnames |
The count of input filenames.