[Mlir-commits] [mlir] [MLIR] Implement remark emitting policies in MLIR (PR #160526)

Guray Ozen llvmlistbot at llvm.org
Wed Sep 24 06:59:22 PDT 2025


================
@@ -300,19 +300,44 @@ RemarkEngine::RemarkEngine(bool printAsEmitRemarks,
     failedFilter = buildFilter(cats, cats.failed);
 }
 
+llvm::LogicalResult RemarkEngine::initialize(
+    std::unique_ptr<MLIRRemarkStreamerBase> streamer,
+    std::unique_ptr<RemarkEmittingPolicyBase> remarkEmittingPolicy,
+    std::string *errMsg) {
+
+  remarkStreamer = std::move(streamer);
+
+  // Capture `this`. Ensure RemarkEngine is not moved after this.
+  auto reportFunc = [this](const Remark &r) { this->reportImpl(r); };
----------------
grypp wrote:

can you show a fix?

https://github.com/llvm/llvm-project/pull/160526


More information about the Mlir-commits mailing list