Changes in src/ControlStruct/Mutate.cc [1fbeebd:25fcb84]
- File:
-
- 1 edited
-
src/ControlStruct/Mutate.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/Mutate.cc
r1fbeebd r25fcb84 18 18 19 19 #include "Common/PassVisitor.h" // for mutateAll 20 #include "Common/SemanticError.h" // for SemanticError21 20 #include "ForExprMutator.h" // for ForExprMutator 22 21 #include "LabelFixer.h" // for LabelFixer … … 28 27 #include "SynTree/Visitor.h" // for acceptAll 29 28 30 using namespace std; 29 namespace ControlStruct { 30 void fixLabels( std::list< Declaration * > & translationUnit ) { 31 PassVisitor<LabelFixer> lfix; 32 acceptAll( translationUnit, lfix ); 33 } 31 34 32 namespace ControlStruct { 33 void mutate( std::list< Declaration * > translationUnit ) { 34 // hoist initialization out of for statements 35 void hoistControlDecls( std::list< Declaration * > & translationUnit ) { 35 36 PassVisitor<ForExprMutator> formut; 36 37 // normalizes label definitions and generates multi-level exit labels38 PassVisitor<LabelFixer> lfix;39 40 37 mutateAll( translationUnit, formut ); 41 acceptAll( translationUnit, lfix );42 38 } 43 39 } // namespace CodeGen
Note:
See TracChangeset
for help on using the changeset viewer.