================ @@ -1331,19 +1334,16 @@ findAssociatedValue(Value privateVar, llvm::IRBuilderBase &builder, /// Initialize a single (first)private variable. You probably want to use /// allocateAndInitPrivateVars instead of this. -static llvm::Error -initPrivateVar(llvm::IRBuilderBase &builder, - LLVM::ModuleTranslation &moduleTranslation, - omp::PrivateClauseOp &privDecl, Value mlirPrivVar, - BlockArgument &blockArg, llvm::Value *llvmPrivateVar, - llvm::SmallVectorImpl<llvm::Value *> &llvmPrivateVars, - llvm::BasicBlock *privInitBlock, - llvm::DenseMap<Value, Value> *mappedPrivateVars = nullptr) { +/// This returns the private variable which has been initialized. This +/// variable should be mapped before constructing the body of the Op. +static llvm::Expected<llvm::Value *> initPrivateVar( + llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation, + omp::PrivateClauseOp &privDecl, Value mlirPrivVar, BlockArgument &blockArg, + llvm::Value *llvmPrivateVar, llvm::BasicBlock *privInitBlock, + llvm::DenseMap<Value, Value> *mappedPrivateVars = nullptr) { Region &initRegion = privDecl.getInitRegion(); if (initRegion.empty()) { ---------------- skatrak wrote:
Nit: Braces on a single-statement 'if'. https://github.com/llvm/llvm-project/pull/125307 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits