Skip to content

Commit b2aa318

Browse files
committed
Update charbox comment
1 parent 81a4ade commit b2aa318

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,11 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder,
19391939
llvm::IRBuilderBase::InsertPointGuard guard(builder);
19401940
builder.SetInsertPoint(builder.GetInsertBlock()->getTerminator());
19411941

1942-
// TODO: this is a bit of a hack for Fortran character boxes
1942+
// TODO: this is a bit of a hack for Fortran character boxes.
1943+
// Character boxes are passed by value into the init region and then the
1944+
// initialized character box is yielded by value. Here we need to store the
1945+
// yielded value into the private allocation, and load the private
1946+
// allocation to match the type expected by region block arguments.
19431947
if ((privateVarOrErr.get() != llvmPrivateVarAlloc) &&
19441948
!mlir::isa<LLVM::LLVMPointerType>(blockArg.getType())) {
19451949
builder.CreateStore(privateVarOrErr.get(), llvmPrivateVarAlloc);

0 commit comments

Comments
 (0)