Ignore:
Timestamp:
Nov 30, 2017, 4:43:59 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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
Message:

Remove label lists from various Statement constructors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/MLEMutator.cc

    r4429b04 rba3706f  
    149149
    150150                        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 );
    153154                        } else assert(0); // as of this point, all statements of a switch are still CaseStmts
    154155                } // if
     
    232233                // transform break/continue statements into goto to simplify later handling of branches
    233234                delete branchStmt;
    234                 return new BranchStmt( std::list<Label>(), exitLabel, BranchStmt::Goto );
     235                return new BranchStmt( exitLabel, BranchStmt::Goto );
    235236        }
    236237
     
    239240                CompoundStmt *newBody;
    240241                if ( ! (newBody = dynamic_cast<CompoundStmt *>( bodyLoop )) ) {
    241                         newBody = new CompoundStmt( std::list< Label >() );
     242                        newBody = new CompoundStmt();
    242243                        newBody->get_kids().push_back( bodyLoop );
    243244                } // if
Note: See TracChangeset for help on using the changeset viewer.