GCC Middle and Back End API Reference
gcc.h File Reference
#include "version.h"
#include "diagnostic-core.h"
Include dependency graph for gcc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  driver
 
struct  spec_function
 

Functions

int do_spec (const char *)
 
void record_temp_file (const char *, int, int)
 
void set_input (const char *)
 
void lang_specific_driver (struct cl_decoded_option **, unsigned int *, int *)
 
int lang_specific_pre_link (void)
 
void driver_get_configure_time_options (void(*cb)(const char *option, void *user_data), void *user_data)
 

Variables

int n_infiles
 
int lang_specific_extra_outfiles
 
const char ** outfiles
 

Function Documentation

◆ do_spec()

int do_spec ( const char * spec)
extern
These are exported by gcc.cc.   
Process the spec SPEC and run the commands specified therein.
Returns 0 if the spec is successfully processed; -1 if failed.   

References argbuf, do_spec_2(), execute(), ggc_alloc(), NULL, set_collect_gcc_options(), and compiler::spec.

Referenced by driver::do_spec_on_infiles(), and driver::maybe_run_linker().

◆ driver_get_configure_time_options()

void driver_get_configure_time_options ( void(*)(const char *option, void *user_data) cb,
void * user_data )
extern
PR jit/64810.
Targets can provide configure-time default options in
OPTION_DEFAULT_SPECS.  The jit needs to access these, but
they are expressed in the spec language.

Run just enough of the driver to be able to expand these
specs, and then call the callback CB on each
such option.  The options strings are *without* a leading
'-' character e.g. ("march=x86-64").  Finally, clean up.   

References do_option_spec(), gcc_assert, ggc_alloc(), i, init_opts_obstack(), n_switches, path_prefix::name, NULL, obstack, option_default_specs, opts_obstack, switchstr::part1, and switches.

◆ lang_specific_driver()

void lang_specific_driver ( struct cl_decoded_option ** ,
unsigned int * ,
int *  )
extern
Spec files linked with gcc.cc must provide definitions for these.   
Called before processing to change/add/remove arguments.   

Referenced by process_command().

◆ lang_specific_pre_link()

int lang_specific_pre_link ( void )
extern
Called before linking.  Returns 0 on success and -1 on failure.   

Referenced by driver::do_spec_on_infiles().

◆ record_temp_file()

void record_temp_file ( const char * filename,
int always_delete,
int fail_delete )
extern
Record FILENAME as a file to be deleted automatically.
ALWAYS_DELETE nonzero means delete it if all compilation succeeds;
otherwise delete it in any case.
FAIL_DELETE nonzero means delete it if a compilation step fails;
otherwise delete it in any case.   

References always_delete_queue, failure_delete_queue, free(), ggc_alloc(), temp_file::name, and temp_file::next.

Referenced by close_at_file(), do_spec_1(), and store_arg().

◆ set_input()

void set_input ( const char * filename)
extern
Set up the various global variables to indicate that we're processing
the input file named FILENAME.   

References basename_length, gcc_input_filename, ggc_alloc(), input_basename, input_filename_length, input_stat_set, input_suffix, and suffixed_basename_length.

Referenced by driver::do_spec_on_infiles().

Variable Documentation

◆ lang_specific_extra_outfiles

int lang_specific_extra_outfiles
extern
Number of extra output files that lang_specific_pre_link may generate.   

Referenced by do_spec_1(), and driver::prepare_infiles().

◆ n_infiles

◆ outfiles

const char** outfiles
extern
A vector of corresponding output files is made up later.   
And a vector of corresponding output files is made up later.   

Referenced by do_spec_1(), driver::do_spec_on_infiles(), end_going_arg(), driver::finalize(), driver::maybe_run_linker(), driver::prepare_infiles(), remove_outfile_spec_function(), and replace_outfile_spec_function().