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