================ @@ -2210,42 +2287,68 @@ static llvm::omp::OpenMPOffloadMappingFlags mapParentWithMembers( // Fortran pointers and allocatables, the mapping of the pointed to // data by the descriptor (which itself, is a structure containing // runtime information on the dynamically allocated data). - llvm::Value *lowAddr = builder.CreatePointerCast( - mapData.Pointers[mapDataIndex], builder.getPtrTy()); - llvm::Value *highAddr = builder.CreatePointerCast( - builder.CreateConstGEP1_32(mapData.BaseType[mapDataIndex], - mapData.Pointers[mapDataIndex], 1), - builder.getPtrTy()); + auto parentClause = + mlir::dyn_cast<mlir::omp::MapInfoOp>(mapData.MapClause[mapDataIndex]); ---------------- skatrak wrote:
Nit: It's assumed that it returned a valid object by never checking it, so it's better to use `cast` to at least assert this is the case. ```suggestion llvm::cast<mlir::omp::MapInfoOp>(mapData.MapClause[mapDataIndex]); ``` https://github.com/llvm/llvm-project/pull/82852 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits