Changeset 3746f777 for src/main.cc


Ignore:
Timestamp:
Nov 12, 2020, 1:26:03 PM (3 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8ca26d5
Parents:
5465377c
Message:

fix Stats::Counter NPE when in new ast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r5465377c r3746f777  
    341341
    342342                if( useNewAST) {
     343                        if (Stats::Counters::enabled) {
     344                                ast::pass_visitor_stats.avg = Stats::Counters::build<Stats::Counters::AverageCounter<double>>("Average Depth - New");
     345                                ast::pass_visitor_stats.max = Stats::Counters::build<Stats::Counters::MaxCounter<double>>("Max depth - New");
     346                        }
    343347                        auto transUnit = convert( move( translationUnit ) );
    344348                        PASS( "Resolve", ResolvExpr::resolve( transUnit ) );
Note: See TracChangeset for help on using the changeset viewer.