[Lldb-commits] [lldb] [lldb][macOS] Index shared cache files by UUID & filename (PR #180874)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 13 18:47:12 PST 2026
================
@@ -683,18 +685,26 @@ 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::DenseMap<ConstString, SharedCacheImageInfo *> &
+ GetHostSCFilenameToImageInfoMap() {
+ return m_filename_map[m_host_uuid];
+ }
+ llvm::DenseMap<UUID, SharedCacheImageInfo *> &GetHostSCUUIDToImageInfoMap() {
+ return m_uuid_map[m_host_uuid];
}
- bool GetImages(llvm::StringMap<SharedCacheImageInfo> **images,
- const UUID &uuid) {
- if (m_caches.find(uuid) != m_caches.end()) {
- *images = &m_caches[uuid];
- return true;
- }
- *images = nullptr;
- return false;
+ llvm::DenseMap<ConstString, SharedCacheImageInfo *> *
+ GetFilenameToImageInfoMap(const UUID &sc_uuid) {
+ if (m_filename_map.contains(sc_uuid))
+ return &m_filename_map[sc_uuid];
+ return nullptr;
+ }
+
+ llvm::DenseMap<UUID, SharedCacheImageInfo *> *
+ GetUUIDToImageInfoMap(const UUID &sc_uuid) {
+ if (m_uuid_map.contains(sc_uuid))
+ return &m_uuid_map[sc_uuid];
+ return nullptr;
}
----------------
jasonmolenda wrote:
I do agree that the interface here -- what is exported, what is private -- is very unclear.
https://github.com/llvm/llvm-project/pull/180874
More information about the lldb-commits
mailing list