Loading mlir/parsers/qasm3/visitor_handlers/loop_stmt_handler.cpp +2 −7 Original line number Diff line number Diff line Loading @@ -621,13 +621,8 @@ void qasm3_visitor::createWhileLoop( // 'After' block must end with a yield op. { mlir::OpBuilder::InsertionGuard g(builder); if (auto b = symbol_table.get_last_created_block()) { builder.setInsertionPointToEnd(b); symbol_table.set_last_created_block(nullptr); } else { mlir::Operation &lastOp = whileOp.after().front().getOperations().back(); builder.setInsertionPointAfter(&lastOp); } builder.create<mlir::scf::YieldOp>(location); } Loading Loading
mlir/parsers/qasm3/visitor_handlers/loop_stmt_handler.cpp +2 −7 Original line number Diff line number Diff line Loading @@ -621,13 +621,8 @@ void qasm3_visitor::createWhileLoop( // 'After' block must end with a yield op. { mlir::OpBuilder::InsertionGuard g(builder); if (auto b = symbol_table.get_last_created_block()) { builder.setInsertionPointToEnd(b); symbol_table.set_last_created_block(nullptr); } else { mlir::Operation &lastOp = whileOp.after().front().getOperations().back(); builder.setInsertionPointAfter(&lastOp); } builder.create<mlir::scf::YieldOp>(location); } Loading