[Mlir-commits] [mlir] [mlir][tblgen] Adds support for embedded LIT tests in TableGen records (PR #158017)

Jacques Pienaar llvmlistbot at llvm.org
Sat Nov 1 21:59:57 PDT 2025


================
@@ -2,64 +2,58 @@
 
 include "mlir/Pass/PassBase.td"
 include "mlir/IR/Testable.td"
+include "mlir/IR/OpBase.td"
 
-def TestPassWithEmbeddedLitTests : Pass<"test-pass-with-embedded-lit-tests"> {
-  let summary = "pass summary";
+def Test_Dialect : Dialect {
+  let name = "test";
+  let cppNamespace = "test";
+}
+
+def TestOp : Op<Test_Dialect, "test_op"> {
+  let summary = "test op with mlir_example code blocks";
   let description = [{
-    Pass description
+    This operation demonstrates the mlir_example feature for ops.
+
+    Basic usage:
+    ```mlir_example
----------------
jpienaar wrote:

( I may suggest also considering other variants of this, else one has to change that GitHub syntax highlighting side too, so ideally one where you can match without needing changes elsewhere would be preferred)

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


More information about the Mlir-commits mailing list