Changeset 41a7137 for src/main.cc


Ignore:
Timestamp:
Jan 31, 2017, 4:55:59 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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:
511aa69a, fa2de95
Parents:
a9fc180
Message:

Added hooks for DeclStats? pass

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    ra9fc180 r41a7137  
    3535#include "CodeGen/FixNames.h"
    3636#include "CodeGen/FixMain.h"
     37#include "CodeTools/DeclStats.h"
    3738#include "ControlStruct/Mutate.h"
    3839#include "SymTab/Validate.h"
     
    6162        bboxp = false,
    6263        ctorinitp = false,
     64        declstatsp = false,
    6365        exprp = false,
    6466        expraltp = false,
     
    212214                } // if
    213215
     216                if ( declstatsp ) {
     217                        CodeTools::printDeclStats( translationUnit );
     218                        deleteAll( translationUnit );
     219                        return 0;
     220                }
     221
    214222                // add the assignment statement after the initialization of a type parameter
    215223                OPTPRINT( "validate" )
     
    339347
    340348void parse_cmdline( int argc, char * argv[], const char *& filename ) {
    341         enum { Ast, Bbox, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
     349        enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
    342350
    343351        static struct option long_opts[] = {
     
    346354                { "before-resolver", no_argument, 0, Bresolver },
    347355                { "ctorinitfix", no_argument, 0, CtorInitFix },
     356                { "decl-stats", no_argument, 0, DeclStats },
    348357                { "expr", no_argument, 0, Expr },
    349358                { "expralt", no_argument, 0, ExprAlt },
     
    365374
    366375        int c;
    367         while ( (c = getopt_long( argc, argv, "abBcefglmnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) {
     376        while ( (c = getopt_long( argc, argv, "abBcdefglmnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) {
    368377                switch ( c ) {
    369378                  case Ast:
     
    381390                  case 'c':
    382391                        ctorinitp = true;
     392                        break;
     393                  case DeclStats:
     394                  case 'd':
     395                    declstatsp = true;
    383396                        break;
    384397                  case Expr:
Note: See TracChangeset for help on using the changeset viewer.