[Lldb-commits] [lldb] [llvm] [Support] Remove address-extraction methods from DataExtractor (NFC) (PR #190519)

Sergei Barannikov via lldb-commits lldb-commits at lists.llvm.org
Sun Apr 5 04:42:19 PDT 2026


================
@@ -70,20 +70,20 @@ std::optional<AddressMap> AddressMap::parse(BinaryContext &BC) {
 
   AddressMap Parsed;
 
-  const size_t EntrySize = 2 * BC.AsmInfo->getCodePointerSize();
+  unsigned CodePointerSize = BC.AsmInfo->getCodePointerSize();
+  const size_t EntrySize = 2 * CodePointerSize;
   auto parseSection =
       [&](BinarySection &Section,
           function_ref<void(uint64_t, uint64_t)> InsertCallback) {
         StringRef Buffer = Section.getOutputContents();
         assert(Buffer.size() % EntrySize == 0 && "Unexpected address map size");
 
-        DataExtractor DE(Buffer, BC.AsmInfo->isLittleEndian(),
-                         BC.AsmInfo->getCodePointerSize());
+        DataExtractor DE(Buffer, BC.AsmInfo->isLittleEndian());
----------------
s-barannikov wrote:

Here, the constructor argument is moved to the argument of the `getUnsigned()` method. The same thing happens in most other places.


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


More information about the lldb-commits mailing list