[Mlir-commits] [mlir] [mlir][EmitC] Create a pass to add a reflection map to a class (PR #205464)

ioana ghiban llvmlistbot at llvm.org
Tue Jul 14 02:44:52 PDT 2026


================
@@ -55,4 +56,73 @@ emitc.class @actionClass {
 // CHECK-NEXT:      %{{.*}} = get_field @fieldName0 : !emitc.array<1xf32>
 // CHECK-NEXT:      return
 // CHECK-NEXT:    }
+// CHECK-NEXT:  }
+
+// -----
+
+/// Test that the pass leaves IR unchanged if fields don't have any attributes
+
+emitc.class @actionClassNoAttrs {
+  // expected-error @below {{FieldOp must have a dictionary attribute named 'emitc.field_ref' with an array containing a string attribute}}
----------------
ioghiban wrote:

The comment above mentions that the pass "leaves IR unchanged". That to me suggests gracefully aborting the rewrite, without throwing errors. Would that be the expected behaviour?

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


More information about the Mlir-commits mailing list