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