[clang] [CIR] Introduce LocalInitOp, & lower static locals (PR #193576)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 22 23:57:50 PDT 2026


================
@@ -371,6 +371,45 @@ LogicalResult cir::BreakOp::verify() {
   return success();
 }
 
+//===----------------------------------------------------------------------===//
+// LocalInitOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult cir::LocalInitOp::verify() {
+  if (!getOperation()->getParentOfType<FuncOp>())
+    return emitOpError("must be inside of a function");
----------------
xlauko wrote:

use `ParentOneOf<FuncOp>` trait instead?

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


More information about the cfe-commits mailing list