Changeset 511aa69a for src/main.cc


Ignore:
Timestamp:
Feb 1, 2017, 2:56:56 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:
eeaea53
Parents:
de90452 (diff), 41a7137 (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:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rde90452 r511aa69a  
    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.