Ignore:
Timestamp:
Aug 27, 2018, 4:40:34 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b7c89aa
Parents:
f9feab8 (diff), 305581d (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' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/Mutate.cc

    rf9feab8 r90152a4  
    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.