Changeset ba3706f for src/ControlStruct/MLEMutator.cc
- Timestamp:
- Nov 30, 2017, 4:43:59 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- c50d54d
- Parents:
- 4429b04
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/MLEMutator.cc
r4429b04 rba3706f 149 149 150 150 if ( CaseStmt * c = dynamic_cast< CaseStmt * >( statements.back() ) ) { 151 std::list<Label> temp; temp.push_back( brkLabel ); 152 c->get_statements().push_back( new BranchStmt( temp, Label("brkLabel"), BranchStmt::Break ) ); 151 Statement * stmt = new BranchStmt( Label("brkLabel"), BranchStmt::Break ); 152 stmt->labels.push_back( brkLabel ); 153 c->get_statements().push_back( stmt ); 153 154 } else assert(0); // as of this point, all statements of a switch are still CaseStmts 154 155 } // if … … 232 233 // transform break/continue statements into goto to simplify later handling of branches 233 234 delete branchStmt; 234 return new BranchStmt( std::list<Label>(),exitLabel, BranchStmt::Goto );235 return new BranchStmt( exitLabel, BranchStmt::Goto ); 235 236 } 236 237 … … 239 240 CompoundStmt *newBody; 240 241 if ( ! (newBody = dynamic_cast<CompoundStmt *>( bodyLoop )) ) { 241 newBody = new CompoundStmt( std::list< Label >());242 newBody = new CompoundStmt(); 242 243 newBody->get_kids().push_back( bodyLoop ); 243 244 } // if
Note: See TracChangeset
for help on using the changeset viewer.