[llvm-branch-commits] [OpenMP][MLIR] Extend record member map support for omp dialect to LLVM-IR (PR #82852)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Apr 23 07:21:32 PDT 2024


================
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
   }
 }
 
+static int getMapDataMemberIdx(MapInfoData &mapData,
+                               mlir::omp::MapInfoOp memberOp) {
+  auto *res = llvm::find(mapData.MapClause, memberOp);
+  assert(res != mapData.MapClause.end());
----------------
skatrak wrote:

Nit: Add a message as well.
```suggestion
  assert(res != mapData.MapClause.end() && "...");
```

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


More information about the llvm-branch-commits mailing list