[PATCH] D123469: [DebugInfo][llvm-dwarfutil] Combine overlapped address ranges.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 15:21:02 PDT 2022


aprantl added a comment.

At first glance this looks fine to me. @JDevlieghere ?



================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinkerAddressRangesMap.h:21
+/// This structure contains description of the half open address range
+/// [LowPC, HighPC) and the adjusment value which should be applied
+/// to the final addresses.
----------------
adjustment


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinkerAddressRangesMap.h:47
+  /// adding, overlapped address ranges are combined into the single range.
+  void addRange(uint64_t LowPC, uint64_t HighPC, int64_t AdjOffset) {
+    // Don't add empty ranges to the interval map.  They are a problem because
----------------
Since this is completely independent, it might make sense to write a unit test for this class.


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinkerAddressRangesMap.h:100
+  // Apply \p Handler to each keeping address range.
+  void enumerate(
+      llvm::function_ref<void(const DwarfLinkerAddressRange &)> Handler) const {
----------------
maybe call this `forEach()`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123469/new/

https://reviews.llvm.org/D123469



More information about the llvm-commits mailing list