[Mlir-commits] [mlir] [mlir] Add test for invalid entry block (PR #133167)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Mar 28 11:55:26 PDT 2025


================
@@ -118,7 +118,8 @@ void call_interface_impl::printFunctionSignature(
       ArrayRef<NamedAttribute> attrs;
       if (argAttrs)
         attrs = llvm::cast<DictionaryAttr>(argAttrs[i]).getValue();
-      p.printRegionArgument(body->getArgument(i), attrs);
+      if (body->getNumArguments() > i)
+        p.printRegionArgument(body->getArgument(i), attrs);
----------------
hiraditya wrote:

mlir already errors on this IR. removing this change and adding modified test to check for error message.

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


More information about the Mlir-commits mailing list