Changeset 358cba0 for src/main.cc


Ignore:
Timestamp:
May 15, 2018, 4:17:15 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, with_gc
Children:
2e5fa345
Parents:
7d0a3ba (diff), a61fa0bb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r7d0a3ba r358cba0  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May  2 14:59:02 2018
    13 // Update Count     : 490
     12// Last Modified On : Mon May  7 14:35:57 2018
     13// Update Count     : 492
    1414//
    1515
     
    6464
    6565#define PASS(name, pass)                   \
    66         if ( errorp ) { cerr << #name << endl; } \
    67         HeapStats::newPass(#name);               \
     66        if ( errorp ) { cerr << name << endl; } \
     67        HeapStats::newPass(name);               \
    6868        pass;
    6969
     
    371371                } // if
    372372                return 1;
    373         } // try
     373        } catch(...) {
     374                std::exception_ptr eptr = std::current_exception();
     375                try {
     376                        if (eptr) {
     377                                std::rethrow_exception(eptr);
     378                        }
     379                        else {
     380                                std::cerr << "Exception Uncaught and Unkown" << std::endl;
     381                        }
     382                } catch(const std::exception& e) {
     383                        std::cerr << "Unaught Exception \"" << e.what() << "\"\n";
     384                }
     385                return 1;
     386        }// try
    374387
    375388        deleteAll( translationUnit );
    376         HeapStats::printStats();
     389        if(!libcfap && !treep) HeapStats::printStats();
    377390        return 0;
    378391} // main
     
    407420        opterr = 0;                                                                                     // (global) prevent getopt from printing error messages
    408421
    409         bool Werror = false;
     422        bool Wsuppress = false, Werror = false;
    410423        int c;
    411424        while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTvwW:yzZD:F:", long_opts, &long_index )) != -1 ) {
     
    495508                        break;
    496509                  case 'w':
    497                         SemanticWarning_SuppressAll();
     510                        Wsuppress = true;
    498511                        break;
    499512                  case 'W':
     
    534547                                assertf( false, "Unknown option: %s\n", argv[optind - 1] );
    535548                        } // if
    536                         #if __GNUC__ < 7
    537                         #else
     549                        #if defined(__GNUC__) && __GNUC__ >= 7
    538550                                __attribute__((fallthrough));
    539551                        #endif
     
    545557        if ( Werror ) {
    546558                SemanticWarning_WarningAsError();
     559        } // if
     560        if ( Wsuppress ) {
     561                SemanticWarning_SuppressAll();
    547562        } // if
    548563        // for ( const auto w : WarningFormats ) {
Note: See TracChangeset for help on using the changeset viewer.