Changeset 53d3ab4b for src/main.cc


Ignore:
Timestamp:
Feb 6, 2018, 4:41:32 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
86c934a
Parents:
bf7b6015
Message:

Add G flag for debug dump after InstantiateGeneric?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rbf7b6015 r53d3ab4b  
    8080        exprp = false,
    8181        expraltp = false,
     82        genericsp = false,
    8283        libcfap = false,
    8384        nopreludep = false,
     
    320321                OPTPRINT("instantiateGenerics")
    321322                GenPoly::instantiateGeneric( translationUnit );
     323                if ( genericsp ) {
     324                        dump( translationUnit );
     325                        return 0;
     326                }
    322327                OPTPRINT( "convertLvalue" )
    323328                GenPoly::convertLvalue( translationUnit );
    324329
     330
    325331                if ( bboxp ) {
    326332                        dump( translationUnit );
     
    340346
    341347                CodeTools::fillLocations( translationUnit );
     348                OPTPRINT( "codegen" )
    342349                CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks );
    343350
    344351                CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" );
     352                OPTPRINT( "end" )
    345353
    346354                if ( output != &cout ) {
     
    407415
    408416        int c;
    409         while ( (c = getopt_long( argc, argv, "abBcCdefglLmnNpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
     417        while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
    410418                switch ( c ) {
    411419                  case Ast:
     
    442450                  case 'g':                                                                             // bison debugging info (grammar rules)
    443451                        yydebug = true;
     452                        break;
     453                  case 'G':                   // dump AST after instantiate generics
     454                        genericsp = true;
    444455                        break;
    445456                  case LibCFA:
Note: See TracChangeset for help on using the changeset viewer.