[Lldb-commits] [lldb] fe298c3 - [NFC][lldb] Delete dead variables in AppleObjCClassDescriptor (#202542)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 10 00:05:31 PDT 2026
Author: Felipe de Azevedo Piovezan
Date: 2026-06-10T08:05:25+01:00
New Revision: fe298c3006e1866df074aba59e4d0ca667ad341b
URL: https://github.com/llvm/llvm-project/commit/fe298c3006e1866df074aba59e4d0ca667ad341b
DIFF: https://github.com/llvm/llvm-project/commit/fe298c3006e1866df074aba59e4d0ca667ad341b.diff
LOG: [NFC][lldb] Delete dead variables in AppleObjCClassDescriptor (#202542)
Some of those were related to caching of information. However, this
cache is never consulted, making the current code misleading: one may
think we are benefiting from the cache, but we're not.
Added:
Modified:
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h
Removed:
################################################################################
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
index b7b92c8948e17..6d5b11e4b7fc6 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
@@ -534,20 +534,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
More information about the lldb-commits
mailing list