[Lldb-commits] [lldb] [lldb][NFCI] Refactor AppleObjCClassDescriptorV2 method_t parsing functions (PR #163291)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 14 10:07:31 PDT 2025


================
@@ -266,22 +267,47 @@ bool ClassDescriptorV2::method_list_t::Read(Process *process,
   return true;
 }
 
-bool ClassDescriptorV2::method_t::Read(Process *process, lldb::addr_t addr,
-                                       lldb::addr_t relative_selector_base_addr,
-                                       bool is_small, bool has_direct_sel) {
-  size_t ptr_size = process->GetAddressByteSize();
-  size_t size = GetSize(process, is_small);
+llvm::SmallVector<ClassDescriptorV2::method_t, 0>
----------------
JDevlieghere wrote:

[begin bikeshedding]
Is  `SmallVector` worth it when returning by value? If not, should we take an out parameter and have a sane default for the stack allocated number of elements? Either way, I think it would be helpful to make this a typedef so you don't have to think about the number of elements in the template.
[end bikeshedding]

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


More information about the lldb-commits mailing list