toplev.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* toplev.h - Various declarations for functions found in toplev.c
  2. Copyright (C) 1998-2015 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. /* Invoking the compiler. */
  21. class toplev
  22. {
  23. public:
  24. toplev (bool use_TV_TOTAL,
  25. bool init_signals);
  26. ~toplev ();
  27. int main (int argc, char **argv);
  28. void finalize ();
  29. private:
  30. void start_timevars ();
  31. bool m_use_TV_TOTAL;
  32. bool m_init_signals;
  33. };
  34. extern void rest_of_decl_compilation (tree, int, int);
  35. extern void rest_of_type_compilation (tree, int);
  36. extern void init_optimization_passes (void);
  37. extern bool enable_rtl_dump_file (void);
  38. /* In except.c. Initialize exception handling. This is used by the Ada
  39. and LTO front ends to initialize EH "on demand". See lto-streamer-in.c
  40. and ada/gcc-interface/misc.c. */
  41. extern void init_eh (void);
  42. extern void announce_function (tree);
  43. extern void wrapup_global_declaration_1 (tree);
  44. extern bool wrapup_global_declaration_2 (tree);
  45. extern bool wrapup_global_declarations (tree *, int);
  46. extern void check_global_declaration_1 (tree);
  47. extern void check_global_declarations (tree *, int);
  48. extern void emit_debug_global_declarations (tree *, int);
  49. extern void write_global_declarations (void);
  50. extern void dump_memory_report (bool);
  51. extern void dump_profile_report (void);
  52. extern void target_reinit (void);
  53. /* A unique local time stamp, might be zero if none is available. */
  54. extern unsigned local_tick;
  55. /* True if the user has tagged the function with the 'section'
  56. attribute. */
  57. extern bool user_defined_section_attribute;
  58. /* See toplev.c. */
  59. extern int flag_rerun_cse_after_global_opts;
  60. extern void print_version (FILE *, const char *, bool);
  61. /* The hashtable, so that the C front ends can pass it to cpplib. */
  62. extern struct ht *ident_hash;
  63. /* Functions used to get and set GCC's notion of in what directory
  64. compilation was started. */
  65. extern const char *get_src_pwd (void);
  66. extern bool set_src_pwd (const char *);
  67. /* Functions used to manipulate the random seed. */
  68. extern HOST_WIDE_INT get_random_seed (bool);
  69. extern const char *set_random_seed (const char *);
  70. extern void initialize_rtl (void);
  71. #endif /* ! GCC_TOPLEV_H */