[clang] [OpenACC] Implement 'firstprivate' clause copy lowering (PR #154150)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 18 13:49:13 PDT 2025
================
@@ -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
More information about the cfe-commits
mailing list