Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r9f5a19fa ra36eb2d  
    99// Author           : Peter Buhr and Rob Schluntz
    1010// Created On       : Fri May 15 23:12:02 2015
    11 // Last Modified By : Henry Xue
    12 // Last Modified On : Mon Aug 23 15:42:08 2021
    13 // Update Count     : 650
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Fri Oct 22 16:06:00 2021
     13// Update Count     : 653
    1414//
    1515
     
    4343#include "Common/CodeLocationTools.hpp"     // for forceFillCodeLocations
    4444#include "Common/CompilerError.h"           // for CompilerError
     45#include "Common/DeclStats.hpp"             // for printDeclStats
     46#include "Common/ResolvProtoDump.hpp"       // for dumpAsResolverProto
    4547#include "Common/Stats.h"
    4648#include "Common/PassVisitor.h"
     
    334336                PASS( "Fix Labels", ControlStruct::fixLabels( translationUnit ) );
    335337                PASS( "Fix Names", CodeGen::fixNames( translationUnit ) );
    336                 PASS( "Gen Init", InitTweak::genInit( translationUnit ) );
    337 
    338                 if ( libcfap ) {
    339                         // generate the bodies of cfa library functions
    340                         LibCfa::makeLibCfa( translationUnit );
    341                 } // if
    342 
    343                 if ( declstatsp ) {
    344                         CodeTools::printDeclStats( translationUnit );
    345                         deleteAll( translationUnit );
    346                         return EXIT_SUCCESS;
    347                 } // if
    348 
    349                 if ( bresolvep ) {
    350                         dump( translationUnit );
    351                         return EXIT_SUCCESS;
    352                 } // if
    353338
    354339                CodeTools::fillLocations( translationUnit );
    355 
    356                 if ( resolvprotop ) {
    357                         CodeTools::dumpAsResolvProto( translationUnit );
    358                         return EXIT_SUCCESS;
    359                 } // if
    360340
    361341                if( useNewAST ) {
     
    366346                        auto transUnit = convert( move( translationUnit ) );
    367347
     348                        forceFillCodeLocations( transUnit );
     349
     350                        PASS( "Gen Init", InitTweak::genInit( transUnit ) );
    368351                        PASS( "Expand Member Tuples" , Tuples::expandMemberTuples( transUnit ) );
    369                        
     352
     353                        if ( libcfap ) {
     354                                // Generate the bodies of cfa library functions.
     355                                LibCfa::makeLibCfa( transUnit );
     356                        } // if
     357
     358                        if ( declstatsp ) {
     359                                printDeclStats( transUnit );
     360                                return EXIT_SUCCESS;
     361                        } // if
     362
     363                        if ( bresolvep ) {
     364                                dump( move( transUnit ) );
     365                                return EXIT_SUCCESS;
     366                        } // if
     367
     368                        if ( resolvprotop ) {
     369                                dumpAsResolverProto( transUnit );
     370                                return EXIT_SUCCESS;
     371                        } // if
     372
    370373                        PASS( "Resolve", ResolvExpr::resolve( transUnit ) );
    371374                        if ( exprp ) {
     
    377380
    378381                        PASS( "Fix Init", InitTweak::fix(transUnit, buildingLibrary()));
     382
    379383                        translationUnit = convert( move( transUnit ) );
    380384                } else {
     385                        PASS( "Gen Init", InitTweak::genInit( translationUnit ) );
    381386                        PASS( "Expand Member Tuples" , Tuples::expandMemberTuples( translationUnit ) );
     387
     388                        if ( libcfap ) {
     389                                // Generate the bodies of cfa library functions.
     390                                LibCfa::makeLibCfa( translationUnit );
     391                        } // if
     392
     393                        if ( declstatsp ) {
     394                                CodeTools::printDeclStats( translationUnit );
     395                                deleteAll( translationUnit );
     396                                return EXIT_SUCCESS;
     397                        } // if
     398
     399                        if ( bresolvep ) {
     400                                dump( translationUnit );
     401                                return EXIT_SUCCESS;
     402                        } // if
     403
     404                        CodeTools::fillLocations( translationUnit );
     405
     406                        if ( resolvprotop ) {
     407                                CodeTools::dumpAsResolvProto( translationUnit );
     408                                return EXIT_SUCCESS;
     409                        } // if
    382410
    383411                        PASS( "Resolve", ResolvExpr::resolve( translationUnit ) );
Note: See TracChangeset for help on using the changeset viewer.