1*38fd1498Szrj /* toplev.h - Various declarations for functions found in toplev.c 2*38fd1498Szrj Copyright (C) 1998-2018 Free Software Foundation, Inc. 3*38fd1498Szrj 4*38fd1498Szrj This file is part of GCC. 5*38fd1498Szrj 6*38fd1498Szrj GCC is free software; you can redistribute it and/or modify it under 7*38fd1498Szrj the terms of the GNU General Public License as published by the Free 8*38fd1498Szrj Software Foundation; either version 3, or (at your option) any later 9*38fd1498Szrj version. 10*38fd1498Szrj 11*38fd1498Szrj GCC is distributed in the hope that it will be useful, but WITHOUT ANY 12*38fd1498Szrj WARRANTY; without even the implied warranty of MERCHANTABILITY or 13*38fd1498Szrj FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14*38fd1498Szrj for more details. 15*38fd1498Szrj 16*38fd1498Szrj You should have received a copy of the GNU General Public License 17*38fd1498Szrj along with GCC; see the file COPYING3. If not see 18*38fd1498Szrj <http://www.gnu.org/licenses/>. */ 19*38fd1498Szrj 20*38fd1498Szrj #ifndef GCC_TOPLEV_H 21*38fd1498Szrj #define GCC_TOPLEV_H 22*38fd1498Szrj 23*38fd1498Szrj /* Decoded options, and number of such options. */ 24*38fd1498Szrj extern struct cl_decoded_option *save_decoded_options; 25*38fd1498Szrj extern unsigned int save_decoded_options_count; 26*38fd1498Szrj 27*38fd1498Szrj class timer; 28*38fd1498Szrj 29*38fd1498Szrj /* Invoking the compiler. */ 30*38fd1498Szrj class toplev 31*38fd1498Szrj { 32*38fd1498Szrj public: 33*38fd1498Szrj toplev (timer *external_timer, 34*38fd1498Szrj bool init_signals); 35*38fd1498Szrj ~toplev (); 36*38fd1498Szrj 37*38fd1498Szrj int main (int argc, char **argv); 38*38fd1498Szrj 39*38fd1498Szrj void finalize (); 40*38fd1498Szrj 41*38fd1498Szrj private: 42*38fd1498Szrj 43*38fd1498Szrj void start_timevars (); 44*38fd1498Szrj 45*38fd1498Szrj void run_self_tests (); 46*38fd1498Szrj 47*38fd1498Szrj bool m_use_TV_TOTAL; 48*38fd1498Szrj bool m_init_signals; 49*38fd1498Szrj }; 50*38fd1498Szrj 51*38fd1498Szrj extern void rest_of_decl_compilation (tree, int, int); 52*38fd1498Szrj extern void rest_of_type_compilation (tree, int); 53*38fd1498Szrj extern void init_optimization_passes (void); 54*38fd1498Szrj extern bool enable_rtl_dump_file (void); 55*38fd1498Szrj 56*38fd1498Szrj /* In except.c. Initialize exception handling. This is used by the Ada 57*38fd1498Szrj and LTO front ends to initialize EH "on demand". See lto-streamer-in.c 58*38fd1498Szrj and ada/gcc-interface/misc.c. */ 59*38fd1498Szrj extern void init_eh (void); 60*38fd1498Szrj 61*38fd1498Szrj extern void announce_function (tree); 62*38fd1498Szrj 63*38fd1498Szrj extern void wrapup_global_declaration_1 (tree); 64*38fd1498Szrj extern bool wrapup_global_declaration_2 (tree); 65*38fd1498Szrj extern bool wrapup_global_declarations (tree *, int); 66*38fd1498Szrj 67*38fd1498Szrj extern void global_decl_processing (void); 68*38fd1498Szrj 69*38fd1498Szrj extern void dump_memory_report (bool); 70*38fd1498Szrj extern void dump_profile_report (void); 71*38fd1498Szrj 72*38fd1498Szrj extern void target_reinit (void); 73*38fd1498Szrj 74*38fd1498Szrj /* A unique local time stamp, might be zero if none is available. */ 75*38fd1498Szrj extern unsigned local_tick; 76*38fd1498Szrj 77*38fd1498Szrj /* See toplev.c. */ 78*38fd1498Szrj extern int flag_rerun_cse_after_global_opts; 79*38fd1498Szrj 80*38fd1498Szrj extern void print_version (FILE *, const char *, bool); 81*38fd1498Szrj 82*38fd1498Szrj /* The hashtable, so that the C front ends can pass it to cpplib. */ 83*38fd1498Szrj extern struct ht *ident_hash; 84*38fd1498Szrj 85*38fd1498Szrj /* Functions used to get and set GCC's notion of in what directory 86*38fd1498Szrj compilation was started. */ 87*38fd1498Szrj 88*38fd1498Szrj extern const char *get_src_pwd (void); 89*38fd1498Szrj extern bool set_src_pwd (const char *); 90*38fd1498Szrj 91*38fd1498Szrj /* Functions used to manipulate the random seed. */ 92*38fd1498Szrj 93*38fd1498Szrj extern HOST_WIDE_INT get_random_seed (bool); 94*38fd1498Szrj extern void set_random_seed (const char *); 95*38fd1498Szrj 96*38fd1498Szrj extern void initialize_rtl (void); 97*38fd1498Szrj 98*38fd1498Szrj #endif /* ! GCC_TOPLEV_H */ 99