Changeset ca1c11f for src/main.cc


Ignore:
Timestamp:
Jan 20, 2016, 12:36:27 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
771b3c3
Parents:
f1e012b
Message:

added constructor debug flag -c, fixed mistake in removing extraneous destructor calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rf1e012b rca1c11f  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Jan 19 13:16:23 2016
    13 // Update Count     : 185
     12// Last Modified On : Tue Jan 19 16:28:13 2016
     13// Update Count     : 194
    1414//
    1515
     
    6262        astp = false,
    6363        bresolvep = false,
     64        ctorinitp = false,
    6465        exprp = false,
    6566        expraltp = false,
     
    7576        codegenp = false;
    7677
    77 enum { Ast, Bresolver, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, };
     78enum { Ast, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, };
    7879
    7980static struct option long_opts[] = {
    8081        { "ast", no_argument, 0, Ast },
    8182        { "before-resolver", no_argument, 0, Bresolver },
     83        { "ctorinitfix", no_argument, 0, CtorInitFix },
    8284        { "expr", no_argument, 0, Expr },
    8385        { "expralt", no_argument, 0, ExprAlt },
     
    102104
    103105        int c;
    104         while ( (c = getopt_long( argc, argv, "abefglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {
     106        while ( (c = getopt_long( argc, argv, "abcefFglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {
    105107                switch ( c ) {
    106108                  case Ast:
     
    111113                  case 'b':                                                                             // print before resolver steps
    112114                        bresolvep = true;
     115                        break;
     116                        case CtorInitFix:
     117                        case 'c':
     118                        ctorinitp = true;
    113119                        break;
    114120                  case Expr:
     
    264270                if ( exprp ) {
    265271                        dump( translationUnit );
     272                        return 0;
    266273                }
    267274
     
    269276                // fix ObjectDecl - replaces ConstructorInit nodes
    270277                InitTweak::fix( translationUnit );
     278                if ( ctorinitp ) {
     279                        dump ( translationUnit );
     280                        return 0;
     281                }
    271282
    272283                OPTPRINT( "instantiateGeneric" )
Note: See TracChangeset for help on using the changeset viewer.