[llvm-branch-commits] [llvm] [Offload] Allow "tagging" device info entries with offload keys (PR #147317)

Joseph Huber via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jul 7 08:23:08 PDT 2025


================
@@ -171,6 +186,12 @@ struct InfoTreeNode {
     return It;
   }
 
+  std::optional<InfoTreeNode *> get(DeviceInfo Info) {
+    if (DeviceInfoMap.count(Info))
+      return &(*Children)[DeviceInfoMap[Info]];
+    return std::nullopt;
----------------
jhuber6 wrote:

```suggestion
    return !DeviceInfoMap.count(Info) std::nullopt : &(*Children)[DeviceInfoMap[Info]];
```

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


More information about the llvm-branch-commits mailing list