================
@@ -159,9 +159,10 @@ void CIRGenFunction::emitAutoVarInit(
     mlir::Value val = lv.getAddress().getPointer();
     assert(val && "Should have an address");
     auto allocaOp = val.getDefiningOp<cir::AllocaOp>();
-    assert(allocaOp && "Address should come straight out of the alloca");
+    assert((allocatedSeparately || allocaOp) &&
+           "Address should come straight out of the alloca");
 
-    if (!allocaOp.use_empty())
+    if (allocaOp && !allocaOp.use_empty())
----------------
andykaylor wrote:

Maybe put everything from line 161 through line 166 under `if 
(emission.wasEmittedAsOffloadClause())` or something similar?

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

Reply via email to