[PATCH] D37214: Another prototype fix for lld DWARF parsing of base address selection entries in range lists

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 13:39:05 PDT 2017


dblaikie added inline comments.


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFUnit.h:271-272
+  void setBaseAddress(BaseAddress BaseAddr) {
+    if (!BaseAddr.Address && BaseAddr.SectionIndex == -1ULL)
+      return;
+    this->BaseAddr = BaseAddr;
----------------
So why is this bit necessary? Should callers just not try to set a base address if they don't want to, rather than having setBaseAddress ignore the request?


================
Comment at: lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp:71
     if (RLE.isBaseAddressSelectionEntry(AddressSize)) {
-      BaseAddress = RLE.EndAddress;
-    } else {
-      Res.push_back({BaseAddress + RLE.StartAddress,
-                     BaseAddress + RLE.EndAddress, RLE.SectionIndex});
+      BaseAddr = { RLE.EndAddress, RLE.SectionIndex };
+      continue;
----------------
Is this clang-formatted? I'd expect no spaces inner sides of the {}


https://reviews.llvm.org/D37214





More information about the llvm-commits mailing list