1*e4b17023SJohn Marino /* Header file for modules that link with gcc.c 2*e4b17023SJohn Marino Copyright (C) 1999, 2000, 2001, 2003, 2004, 2007, 2008, 2010 3*e4b17023SJohn Marino Free Software Foundation, Inc. 4*e4b17023SJohn Marino 5*e4b17023SJohn Marino This file is part of GCC. 6*e4b17023SJohn Marino 7*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify it under 8*e4b17023SJohn Marino the terms of the GNU General Public License as published by the Free 9*e4b17023SJohn Marino Software Foundation; either version 3, or (at your option) any later 10*e4b17023SJohn Marino version. 11*e4b17023SJohn Marino 12*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT ANY 13*e4b17023SJohn Marino WARRANTY; without even the implied warranty of MERCHANTABILITY or 14*e4b17023SJohn Marino FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15*e4b17023SJohn Marino for more details. 16*e4b17023SJohn Marino 17*e4b17023SJohn Marino You should have received a copy of the GNU General Public License 18*e4b17023SJohn Marino along with GCC; see the file COPYING3. If not see 19*e4b17023SJohn Marino <http://www.gnu.org/licenses/>. */ 20*e4b17023SJohn Marino 21*e4b17023SJohn Marino #ifndef GCC_GCC_H 22*e4b17023SJohn Marino #define GCC_GCC_H 23*e4b17023SJohn Marino 24*e4b17023SJohn Marino #include "version.h" 25*e4b17023SJohn Marino #include "diagnostic-core.h" 26*e4b17023SJohn Marino 27*e4b17023SJohn Marino /* The mapping of a spec function name to the C function that 28*e4b17023SJohn Marino implements it. */ 29*e4b17023SJohn Marino struct spec_function 30*e4b17023SJohn Marino { 31*e4b17023SJohn Marino const char *name; 32*e4b17023SJohn Marino const char *(*func) (int, const char **); 33*e4b17023SJohn Marino }; 34*e4b17023SJohn Marino 35*e4b17023SJohn Marino /* These are exported by gcc.c. */ 36*e4b17023SJohn Marino extern int do_spec (const char *); 37*e4b17023SJohn Marino extern void record_temp_file (const char *, int, int); 38*e4b17023SJohn Marino extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN; 39*e4b17023SJohn Marino extern void set_input (const char *); 40*e4b17023SJohn Marino 41*e4b17023SJohn Marino /* Spec files linked with gcc.c must provide definitions for these. */ 42*e4b17023SJohn Marino 43*e4b17023SJohn Marino /* Called before processing to change/add/remove arguments. */ 44*e4b17023SJohn Marino extern void lang_specific_driver (struct cl_decoded_option **, 45*e4b17023SJohn Marino unsigned int *, int *); 46*e4b17023SJohn Marino 47*e4b17023SJohn Marino /* Called before linking. Returns 0 on success and -1 on failure. */ 48*e4b17023SJohn Marino extern int lang_specific_pre_link (void); 49*e4b17023SJohn Marino 50*e4b17023SJohn Marino extern int n_infiles; 51*e4b17023SJohn Marino 52*e4b17023SJohn Marino /* Number of extra output files that lang_specific_pre_link may generate. */ 53*e4b17023SJohn Marino extern int lang_specific_extra_outfiles; 54*e4b17023SJohn Marino 55*e4b17023SJohn Marino /* A vector of corresponding output files is made up later. */ 56*e4b17023SJohn Marino 57*e4b17023SJohn Marino extern const char **outfiles; 58*e4b17023SJohn Marino 59*e4b17023SJohn Marino #endif /* ! GCC_GCC_H */ 60