[Openmp-commits] [openmp] Fix mapping of struct to device (PR #70821)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Tue Oct 31 10:08:53 PDT 2023


================
@@ -573,11 +573,38 @@ int targetDataBegin(ident_t *Loc, DeviceTy &Device, int32_t ArgNum,
                     void **ArgMappers, AsyncInfoTy &AsyncInfo,
                     bool FromMapper) {
   TIMESCOPE_WITH_IDENT(Loc);
+
+  // Initialize new map type with old type:
+  SmallVector<int64_t> NewArgTypes = SmallVector<int64_t>(ArgNum);
+  for (int32_t I = 0; I < ArgNum; ++I) {
+    NewArgTypes[I] = ArgTypes[I];
+  }
----------------
jhuber6 wrote:

Nit, no braces

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


More information about the Openmp-commits mailing list