File tree Expand file tree Collapse file tree 4 files changed +8
-12
lines changed Expand file tree Collapse file tree 4 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -429,16 +429,17 @@ class RemarkEngine {
429429 // / main remark streamer.
430430 ~RemarkEngine ();
431431
432- // / Shutdown the remark engine. This will finalize the remark engine and
433- // / close the output file.
434- void shutdown ();
435-
436432 // / Setup the remark engine with the given output path and format.
437433 LogicalResult
438434 initialize (std::unique_ptr<MLIRRemarkStreamerBase> streamer,
439435 std::unique_ptr<RemarkEmittingPolicyBase> remarkEmittingPolicy,
440436 std::string *errMsg);
441437
438+ // / Get the remark emitting policy.
439+ RemarkEmittingPolicyBase *getRemarkEmittingPolicy () const {
440+ return remarkEmittingPolicy.get ();
441+ }
442+
442443 // / Report a remark.
443444 void report (const Remark &&remark);
444445
Original file line number Diff line number Diff line change @@ -237,12 +237,6 @@ void RemarkEngine::reportImpl(const Remark &remark) {
237237 emitRemark (remark.getLocation (), remark.getMsg ());
238238}
239239
240- void RemarkEngine::shutdown () {
241- if (remarkEmittingPolicy) {
242- remarkEmittingPolicy->finalize ();
243- }
244- }
245-
246240void RemarkEngine::report (const Remark &&remark) {
247241 if (remarkEmittingPolicy)
248242 remarkEmittingPolicy->reportRemark (remark);
Original file line number Diff line number Diff line change @@ -618,7 +618,8 @@ performActions(raw_ostream &os,
618618 os << OpWithState (op.get (), asmState) << ' \n ' ;
619619
620620 if (remark::detail::RemarkEngine *engine = ctx.getRemarkEngine ())
621- engine->shutdown ();
621+ engine->getRemarkEmittingPolicy ()->finalize ();
622+
622623 return success ();
623624}
624625
Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ TEST(Remark, TestRemarkFinal) {
374374 << pass4Msg;
375375
376376 // Finalize the remark engine
377- context. getRemarkEngine ()-> shutdown ();
377+ policy-> finalize ();
378378 }
379379
380380 llvm::errs ().flush ();
You can’t perform that action at this time.
0 commit comments