Changeset 3fe34ae for src/main.cc


Ignore:
Timestamp:
Jan 12, 2017, 2:05:03 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
7cc2c8d, 981bdc6
Parents:
0270824
Message:

Added bootloader.cf which contains the main that wraps the user main

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r0270824 r3fe34ae  
    6666        nopreludep = false,
    6767        noprotop = false,
     68        nomainp = false,
    6869        parsep = false,
    6970        resolvep = false,                                                                       // used in AlternativeFinder
     
    7980static void dump( list< Declaration * > & translationUnit, ostream & out = cout );
    8081
     82bool translation_unit_nomain = true;
    8183std::unique_ptr<FunctionDecl> translation_unit_main_signature = nullptr;
    8284
     
    157159
    158160        parse_cmdline( argc, argv, filename );                          // process command-line arguments
     161        translation_unit_nomain = nomainp;
    159162
    160163        try {
     
    375378
    376379        int c;
    377         while ( (c = getopt_long( argc, argv, "abBcefglnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) {
     380        while ( (c = getopt_long( argc, argv, "abBcefglmnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) {
    378381                switch ( c ) {
    379382                  case Ast:
     
    415418                  case 'p':                                                                             // generate prototypes for preamble functions
    416419                        noprotop = true;
     420                        break;
     421                  case 'm':                                                                             // don't replace the main
     422                        nomainp = true;
    417423                        break;
    418424                  case Parse:
Note: See TracChangeset for help on using the changeset viewer.