Changeset 400b8be for src/InitTweak
- Timestamp:
- Mar 28, 2022, 10:41:45 AM (4 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 8e819a9
- Parents:
- f5bace8
- File:
-
- 1 edited
-
src/InitTweak/InitTweak.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
rf5bace8 r400b8be 423 423 loc, targetLabel.newName(), { new ast::Attribute{ "unused" } } }; 424 424 425 std::vector< ast::ptr< ast:: Stmt> > branches;425 std::vector< ast::ptr< ast::CaseClause > > branches; 426 426 for ( const ast::Init * init : *listInit ) { 427 427 auto condition = ast::ConstantExpr::from_ulong( loc, cond ); … … 432 432 stmts.emplace_back( 433 433 new ast::BranchStmt{ loc, ast::BranchStmt::Break, switchLabel } ); 434 branches.emplace_back( new ast::Case Stmt{ loc, condition, std::move( stmts ) } );434 branches.emplace_back( new ast::CaseClause{ loc, condition, std::move( stmts ) } ); 435 435 } 436 436 out.emplace_back( new ast::SwitchStmt{ loc, index, std::move( branches ) } );
Note:
See TracChangeset
for help on using the changeset viewer.