File tree Expand file tree Collapse file tree
lib/Conversion/FIRRTLToHW Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5478,12 +5478,11 @@ LogicalResult FIRRTLLowering::visitStmt(FPrintFOp op) {
54785478 if (failed (formatString))
54795479 return failure ();
54805480
5481- OpBuilder::InsertionGuard guard (builder);
5482- auto triggeredOp = sim::TriggeredOp::create (builder, clock, cond);
5483- builder.setInsertionPointToStart (triggeredOp.getBodyBlock ());
5484- auto fileOp = sim::GetFileOp::create (builder, *fileFormatString);
5485- sim::PrintFormattedProcOp::create (builder, *formatString,
5486- fileOp->getResult (0 ));
5481+ sim::TriggeredOp::create (builder, clock, cond, [&] {
5482+ auto fileOp = sim::GetFileOp::create (builder, *fileFormatString);
5483+ sim::PrintFormattedProcOp::create (builder, *formatString,
5484+ fileOp->getResult (0 ));
5485+ });
54875486 return success ();
54885487 }
54895488
You can’t perform that action at this time.
0 commit comments