================
@@ -4383,6 +4391,18 @@ cir::EhTypeIdOp::verifySymbolUses(SymbolTableCollection 
&symbolTable) {
   return success();
 }
 
+//===----------------------------------------------------------------------===//
+// LifetimeStartOp & LifetimeEndOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult cir::LifetimeStartOp::verify() {
+  return verifyProducedBy<cir::AllocaOp>(*this, getPtr(), "ptr");
+}
+
+LogicalResult cir::LifetimeEndOp::verify() {
+  return verifyProducedBy<cir::AllocaOp>(*this, getPtr(), "ptr");
----------------
erichkeane wrote:

Do we want/have any ability to make sure that this is also referenced by a 
'start' lifetime op?  Or do we conceive of a situation where it could 'end' the 
lifetime of something that it can't see the 'start' of? 

IF so, I wonder if we should have it take the start-lifetime-op's result value.

https://github.com/llvm/llvm-project/pull/199599
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to