Ignore:
Timestamp:
Nov 30, 2017, 4:43:59 PM (6 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/InitTweak/InitTweak.cc

    r4429b04 rba3706f  
    1919#include "SynTree/Expression.h"    // for Expression, UntypedExpr, Applicati...
    2020#include "SynTree/Initializer.h"   // for Initializer, ListInit, Designation
    21 #include "SynTree/Label.h"         // for Label, noLabels
     21#include "SynTree/Label.h"         // for Label
    2222#include "SynTree/Statement.h"     // for CompoundStmt, ExprStmt, BranchStmt
    2323#include "SynTree/Type.h"          // for FunctionType, ArrayType, PointerType
     
    195195                        callExpr->get_args().splice( callExpr->get_args().end(), args );
    196196
    197                         *out++ = new IfStmt( noLabels, cond, new ExprStmt( noLabels, callExpr ), nullptr );
     197                        *out++ = new IfStmt( cond, new ExprStmt( callExpr ), nullptr );
    198198
    199199                        UntypedExpr * increment = new UntypedExpr( new NameExpr( "++?" ) );
    200200                        increment->get_args().push_back( index->clone() );
    201                         *out++ = new ExprStmt( noLabels, increment );
     201                        *out++ = new ExprStmt( increment );
    202202                }
    203203
     
    244244                                        std::list< Statement * > stmts;
    245245                                        build( callExpr, idx, idxEnd, init, back_inserter( stmts ) );
    246                                         stmts.push_back( new BranchStmt( noLabels, switchLabel, BranchStmt::Break ) );
    247                                         CaseStmt * caseStmt = new CaseStmt( noLabels, condition, stmts );
     246                                        stmts.push_back( new BranchStmt( switchLabel, BranchStmt::Break ) );
     247                                        CaseStmt * caseStmt = new CaseStmt( condition, stmts );
    248248                                        branches.push_back( caseStmt );
    249249                                }
    250                                 *out++ = new SwitchStmt( noLabels, index->clone(), branches );
    251                                 *out++ = new NullStmt( std::list<Label>{ switchLabel } );
     250                                *out++ = new SwitchStmt( index->clone(), branches );
     251                                *out++ = new NullStmt( { switchLabel } );
    252252                        }
    253253                }
     
    262262        Statement * InitImpl::buildListInit( UntypedExpr * dst, std::list< Expression * > & indices ) {
    263263                if ( ! init ) return nullptr;
    264                 CompoundStmt * block = new CompoundStmt( noLabels );
     264                CompoundStmt * block = new CompoundStmt();
    265265                build( dst, indices.begin(), indices.end(), init, back_inserter( block->get_kids() ) );
    266266                if ( block->get_kids().empty() ) {
Note: See TracChangeset for help on using the changeset viewer.