================
@@ -684,14 +686,29 @@ void dyld_shared_cache_for_each_image(dyld_shared_cache_t 
cache,
 namespace {
 class SharedCacheInfo {
 public:
-  llvm::StringMap<SharedCacheImageInfo> &GetImages() {
-    return m_caches[m_host_uuid];
+  llvm::StringMap<SharedCacheImageInfo *> &GetFilenameToImageInfoMap() {
+    return m_filename_map[m_host_uuid];
+  }
+  llvm::DenseMap<UUID, SharedCacheImageInfo *> &GetUUIDToImageInfoMap() {
+    return m_uuid_map[m_host_uuid];
+  }
+
+  bool
+  GetFilenameToImageInfoMap(llvm::StringMap<SharedCacheImageInfo *> **images,
+                            const UUID &sc_uuid) {
+    if (m_filename_map.contains(sc_uuid)) {
+      *images = &m_filename_map[sc_uuid];
+      return true;
+    }
+    *images = nullptr;
+    return false;
   }
 
-  bool GetImages(llvm::StringMap<SharedCacheImageInfo> **images,
-                 const UUID &uuid) {
-    if (m_caches.find(uuid) != m_caches.end()) {
-      *images = &m_caches[uuid];
+  bool
+  GetUUIDToImageInfoMap(llvm::DenseMap<UUID, SharedCacheImageInfo *> **images,
----------------
jasonmolenda wrote:

Ah yes, that's much better, I wasn't thinking clearly when I did that.

https://github.com/llvm/llvm-project/pull/180874
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to