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