[llvm] [Offload] Introduce ATTACH map-type support for pointer attachment. (PR #149036)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 30 07:37:08 PDT 2025


================
@@ -165,12 +165,27 @@ targetData(ident_t *Loc, int64_t DeviceId, int32_t ArgNum, void **ArgsBase,
                                              OMPT_GET_RETURN_ADDRESS);)
 
   int Rc = OFFLOAD_SUCCESS;
+
+  // Only allocate AttachInfo for targetDataBegin
+  AttachInfoTy *AttachInfo = nullptr;
+  if (TargetDataFunction == targetDataBegin)
+    AttachInfo = new AttachInfoTy();
----------------
jhuber6 wrote:

`std::unique_ptr<AttachInfo>`?

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


More information about the llvm-commits mailing list