[Mlir-commits] [mlir] [mlir][tblgen] Fix bug when mixing props and InferTypes (PR #157367)

Markus Böck llvmlistbot at llvm.org
Mon Sep 8 05:41:56 PDT 2025


================
@@ -3907,6 +3906,8 @@ void OpEmitter::genTypeInterfaceMethods() {
           typeStr =
               ("odsInferredTypeAttr" + Twine(inferredTypeIdx) + ".getType()")
                   .str();
+        } else {
+          llvm_unreachable("Properties cannot be used for type inference");
----------------
zero9178 wrote:

This can be reached by users (e.g. by modifying your test to reference `"prop"` and should therefore be an error rather than `llvm_unreachable`. `llvm_unreachable` should not be used for user facing errors but rather as a kind of assertion.

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


More information about the Mlir-commits mailing list