================
@@ -1349,15 +1349,45 @@ mlir::LogicalResult cir::GlobalOp::verify() {
       return failure();
   }
 
+  // Verify that the constructor region, if present, has only one block which 
is
+  // not empty.
+  auto &ctorRegion = getCtorRegion();
+  if (!ctorRegion.empty()) {
+    if (!ctorRegion.hasOneBlock()) {
+      return emitError() << "ctor region must have exactly one block.";
+    }
----------------
xlauko wrote:

No need to check after `MaxSizedRegion<1>`

https://github.com/llvm/llvm-project/pull/160779
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to