Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/Mutate.cc

    r1fbeebd r25fcb84  
    1818
    1919#include "Common/PassVisitor.h"    // for mutateAll
    20 #include "Common/SemanticError.h"  // for SemanticError
    2120#include "ForExprMutator.h"        // for ForExprMutator
    2221#include "LabelFixer.h"            // for LabelFixer
     
    2827#include "SynTree/Visitor.h"       // for acceptAll
    2928
    30 using namespace std;
     29namespace ControlStruct {
     30        void fixLabels( std::list< Declaration * > & translationUnit ) {
     31                PassVisitor<LabelFixer> lfix;
     32                acceptAll( translationUnit, lfix );
     33        }
    3134
    32 namespace ControlStruct {
    33         void mutate( std::list< Declaration * > translationUnit ) {
    34                 // hoist initialization out of for statements
     35        void hoistControlDecls( std::list< Declaration * > & translationUnit ) {
    3536                PassVisitor<ForExprMutator> formut;
    36 
    37                 // normalizes label definitions and generates multi-level exit labels
    38                 PassVisitor<LabelFixer> lfix;
    39 
    4037                mutateAll( translationUnit, formut );
    41                 acceptAll( translationUnit, lfix );
    4238        }
    4339} // namespace CodeGen
Note: See TracChangeset for help on using the changeset viewer.