[clang] [CIR][OpenMP] Lowering for the private clause for scalar local variables (PR #245430)

Pedro da Rosa Pinheiro via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 6 07:17:53 PST 2026


================
@@ -123,6 +124,20 @@ emitParallelOp(CIRGenFunction &cgf, const DirectiveTy &s,
     parallelOp.setCombined(true);
 
   mlir::Block &block = parallelOp.getRegion().emplaceBlock();
+
+  for (auto varAddr : clauseOps.privateVars)
+    block.addArgument(varAddr.getType(), varAddr.getLoc());
+
+  llvm::SmallVector<std::unique_ptr<CIRGenFunction::DeclMapRevertingRAII>>
----------------
pedropiin wrote:

Nice. I've implemented your suggestions because I suppose either your PR will get merged before mine or around the same time.

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


More information about the cfe-commits mailing list