Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rebcc940 rd08beee  
    3737#include "CodeTools/TrackLoc.h"             // for fillLocations
    3838#include "Common/CompilerError.h"           // for CompilerError
    39 #include "Common/Stats.h"
     39#include "Common/Heap.h"
    4040#include "Common/PassVisitor.h"
    4141#include "Common/SemanticError.h"           // for SemanticError
     
    6767#define PASS(name, pass)                   \
    6868        if ( errorp ) { cerr << name << endl; } \
    69         Stats::Heap::newPass(name);               \
     69        HeapStats::newPass(name);               \
    7070        pass;
    7171
     
    377377
    378378        deleteAll( translationUnit );
    379         if(!libcfap && !treep) {
    380                 if(stats_counters) Stats::Counters::print();
    381                 if(stats_heap) Stats::Heap::print();
    382         }
    383 
     379        if(!libcfap && !treep) HeapStats::printStats();
    384380        return 0;
    385381} // main
    386382
    387383void parse_cmdline( int argc, char * argv[], const char *& filename ) {
    388         enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto, Stats, Symbol, Tree, TupleExpansion, Validate};
     384        enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto, Symbol, Tree, TupleExpansion, Validate, };
    389385
    390386        static struct option long_opts[] = {
     
    406402                { "resolver", no_argument, 0, Resolver },
    407403                { "resolv-proto", no_argument, 0, ResolvProto },
    408                 { "stats", required_argument, 0, Stats },
    409404                { "symbol", no_argument, 0, Symbol },
    410405                { "tree", no_argument, 0, Tree },
     
    494489                  case 'R':                                                                             // dump resolv-proto instance
    495490                        resolvprotop = true;
    496                         break;
    497                   case Stats:
    498                         {
    499                                 std::stringstream ss(optarg);
    500                                 while(ss.good()) {
    501                                         std::string substr;
    502                                         getline( ss, substr, ',' );
    503                                         if(substr == "counters") {
    504                                                 stats_counters = true;
    505                                         } else if(substr == "heap") {
    506                                                 stats_heap = true;
    507                                         } else if(substr == "none") {
    508                                                 stats_counters = false;
    509                                                 stats_heap = false;
    510                                         } else {
    511                                                 std::cerr << "Ignoring unknown statistic " << substr << std::endl;
    512                                         }
    513                                 }
    514 
    515                         }
    516491                        break;
    517492                  case Symbol:
Note: See TracChangeset for help on using the changeset viewer.