[llvm] [llvm-objdump][macho] Add support for ObjC relative method lists (PR #84250)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 12:16:59 PDT 2024


================
@@ -3519,6 +3519,12 @@ static const char *get_pointer_64(uint64_t Address, uint32_t &offset,
   return nullptr;
 }
 
+static const char *get_value_32(uint32_t Address, uint32_t &offset,
+                                uint32_t &left, SectionRef &S,
+                                DisassembleInfo *info, bool objc_only = false) {
+  return get_pointer_64(Address, offset, left, S, info, objc_only);
+}
+
----------------
alx32 wrote:

There is no difference, but the coding style in this file is to use separate functions with different names - even if identical. 

Ex: `get_pointer_32` is just direct calling `get_pointer_64`. So I made `get_value_32` when reading a delta. They could just be `get_value` or `get_pointer`, but throughout the file this split-based-on-usage styling is employed. Another example is `method_list32_t` and `method_list64_t` which are  identical.

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


More information about the llvm-commits mailing list