Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.19 KB | None | 0 0
  1. /* Entry point of cc1, cc1plus, jc1, f771, etc.
  2.    Exit code is FATAL_EXIT_CODE if can't open files or if there were
  3.    any errors, or SUCCESS_EXIT_CODE if compilation succeeded.
  4.  
  5.    It is not safe to call this function more than once.  */
  6.  
  7. int
  8. toplev_main (int argc, char **argv)
  9. {
  10.   expandargv (&argc, &argv);
  11.  
  12.   save_argv = CONST_CAST2 (const char **, char **, argv);
  13.  
  14.   /* Initialization of GCC's environment, and diagnostics.  */
  15.   general_init (argv[0]);
  16.  
  17.   /* Parse the options and do minimal processing; basically just
  18.      enough to default flags appropriately.  */
  19.   decode_options (argc, CONST_CAST2 (const char **, char **, argv));
  20.  
  21.   init_local_tick ();
  22.  
  23.   initialize_plugins ();
  24.  
  25.   if (version_flag)
  26.     print_version (stderr, "");
  27.  
  28.   if (help_flag)
  29.     print_plugins_help (stderr, "");
  30.  
  31.   /* Exit early if we can (e.g. -help).  */
  32.   if (!exit_after_options)
  33.     do_compile ();
  34.  
  35.   if (warningcount || errorcount)
  36.     print_ignored_options ();
  37.  
  38.   /* Invoke registered plugin callbacks if any.  */
  39.   invoke_plugin_callbacks (PLUGIN_FINISH, NULL);
  40.  
  41.   finalize_plugins ();
  42.   if (errorcount || sorrycount)
  43.     return (FATAL_EXIT_CODE);
  44.  
  45.   return (SUCCESS_EXIT_CODE);
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement