llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Felipe de Azevedo Piovezan (felipepiovezan)

<details>
<summary>Changes</summary>

Some of those were related to caching of information. However, this cache is 
never consulted, making the current code misleading: one may thing we are 
benefiting from the cache, but we're not.

---
Full diff: https://github.com/llvm/llvm-project/pull/202542.diff


2 Files Affected:

- (modified) 
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
 (+1-8) 
- (modified) 
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h
 (+1-6) 


``````````diff
diff --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
index 1b8992d5e3f5d..4ddcdb5abc5ae 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
@@ -527,20 +527,13 @@ llvm::Error ClassDescriptorV2::ProcessRelativeMethodLists(
     if (!method_list)
       return method_list.takeError();
 
-    // 5. Cache the result so we don't need to reconstruct it later.
-    m_image_to_method_lists[entry.m_image_index].emplace_back(*method_list);
-
-    // 6. If the relevant image is loaded, add the methods to the Decl
+    // 5. If the relevant image is loaded, add the methods to the Decl
     if (!m_runtime.IsSharedCacheImageLoaded(entry.m_image_index))
       continue;
 
     ProcessMethodList(instance_method_func, *method_list);
   }
 
-  // We need to keep track of the last time we updated so we can re-update the
-  // type information in the future
-  m_last_version_updated = m_runtime.GetSharedCacheImageHeaderVersion();
-
   return llvm::Error::success();
 }
 
diff --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h
index e62eedf92c579..0149d53d09f53 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h
@@ -247,8 +247,7 @@ class ClassDescriptorV2 : public 
ObjCLanguageRuntime::ClassDescriptor {
   ClassDescriptorV2(AppleObjCRuntimeV2 &runtime,
                     ObjCLanguageRuntime::ObjCISA isa, const char *name)
       : m_runtime(runtime), m_objc_class_ptr(isa), m_name(name),
-        m_ivars_storage(), m_image_to_method_lists(), m_last_version_updated() 
{
-  }
+        m_ivars_storage() {}
 
   static llvm::Expected<class_ro_t>
   Read_class_row(Process *process, const objc_class_t &objc_class);
@@ -269,10 +268,6 @@ class ClassDescriptorV2 : public 
ObjCLanguageRuntime::ClassDescriptor {
                                  // their ISA)
   ConstString m_name;            // May be NULL
   iVarsStorage m_ivars_storage;
-
-  mutable std::map<uint16_t, std::vector<method_list_t>>
-      m_image_to_method_lists;
-  mutable std::optional<uint64_t> m_last_version_updated;
 };
 
 // tagged pointer descriptor

``````````

</details>


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

Reply via email to