toplev.h 2.9 KB

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