comparison gcc/gcc.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Header file for modules that link with gcc.c 1 /* Header file for modules that link with gcc.c
2 Copyright (C) 1999, 2000, 2001, 2003, 2004, 2007, 2008, 2010 2 Copyright (C) 1999-2017 Free Software Foundation, Inc.
3 Free Software Foundation, Inc.
4 3
5 This file is part of GCC. 4 This file is part of GCC.
6 5
7 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
21 #ifndef GCC_GCC_H 20 #ifndef GCC_GCC_H
22 #define GCC_GCC_H 21 #define GCC_GCC_H
23 22
24 #include "version.h" 23 #include "version.h"
25 #include "diagnostic-core.h" 24 #include "diagnostic-core.h"
25
26 /* The top-level "main" within the driver would be ~1000 lines long.
27 This class breaks it up into smaller functions and contains some
28 state shared by them. */
29
30 class driver
31 {
32 public:
33 driver (bool can_finalize, bool debug);
34 ~driver ();
35 int main (int argc, char **argv);
36 void finalize ();
37
38 private:
39 void set_progname (const char *argv0) const;
40 void expand_at_files (int *argc, char ***argv) const;
41 void decode_argv (int argc, const char **argv);
42 void global_initializations ();
43 void build_multilib_strings () const;
44 void set_up_specs () const;
45 void putenv_COLLECT_GCC (const char *argv0) const;
46 void maybe_putenv_COLLECT_LTO_WRAPPER () const;
47 void maybe_putenv_OFFLOAD_TARGETS () const;
48 void build_option_suggestions (void);
49 const char *suggest_option (const char *bad_opt);
50 void handle_unrecognized_options ();
51 int maybe_print_and_exit () const;
52 bool prepare_infiles ();
53 void do_spec_on_infiles () const;
54 void maybe_run_linker (const char *argv0) const;
55 void final_actions () const;
56 int get_exit_code () const;
57
58 private:
59 char *explicit_link_files;
60 struct cl_decoded_option *decoded_options;
61 unsigned int decoded_options_count;
62 auto_vec <char *> *m_option_suggestions;
63 };
26 64
27 /* The mapping of a spec function name to the C function that 65 /* The mapping of a spec function name to the C function that
28 implements it. */ 66 implements it. */
29 struct spec_function 67 struct spec_function
30 { 68 {
54 92
55 /* A vector of corresponding output files is made up later. */ 93 /* A vector of corresponding output files is made up later. */
56 94
57 extern const char **outfiles; 95 extern const char **outfiles;
58 96
97 extern void
98 driver_get_configure_time_options (void (*cb)(const char *option,
99 void *user_data),
100 void *user_data);
101
59 #endif /* ! GCC_GCC_H */ 102 #endif /* ! GCC_GCC_H */