================
@@ -2764,7 +2782,12 @@ static void processMapMembersWithParent(
         mapData.DevicePointers[memberDataIdx]);
     combinedInfo.Names.emplace_back(
         LLVM::createMappingInformation(memberClause.getLoc(), ompBuilder));
-    combinedInfo.BasePointers.emplace_back(mapData.BasePointers[mapDataIndex]);
+    if (checkIfPointerMap(memberClause))
+      combinedInfo.BasePointers.emplace_back(
+          mapData.BasePointers[memberDataIdx]);
+    else
+      combinedInfo.BasePointers.emplace_back(
+          mapData.BasePointers[mapDataIndex]);
----------------
skatrak wrote:

Nit: Consider refactoring this a bit, since at the moment it's a bit difficult 
to tell at first glance what the difference is between the two branches. Feel 
free to ignore if you disagree.
```suggestion
    uint64_t basePointerIndex = checkIfPointerMap(memberClause)? memberDataIdx 
: mapDataIndex;
    
combinedInfo.BasePointers.emplace_back(mapData.BasePointers[basePointerIndex]);
```

https://github.com/llvm/llvm-project/pull/111191
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to