[PATCH] D142936: [dsymutil] dsymutil produces broken lines info (probably) with LTO on mac

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 14:03:19 PST 2023


avl created this revision.
avl added reviewers: aprantl, JDevlieghere, friss.
Herald added subscribers: hiraditya, inglorion.
Herald added a project: All.
avl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch fixes #60307 issue. The 8bb4451 <https://reviews.llvm.org/rG8bb4451a651ac00432d04e020d83f43c445aaebb> introduces the possibility
to unite overlapped or adjacent address ranges to keep address ranges
in an unambiguous state. The AddressRangesMap is used to normalize
address ranges. The AddressRangesMap keeps address ranges and the value
of the relocated address. For intersected range, it creates a united
range that keeps the last inserted mapping value. The same for adjusted ranges.
While it is OK to use the last inserted mapping value for intersected ranges
(as there is no way how to resolve ambiguity) It is not OK to use the
last inserted value for adjacent address ranges. Currently, two following
address ranges are united into a single one:

{0,24,17e685c} {24,d8,55afe20} -> {0,d8,55afe20}

To avoid the problem, the AddressRangesMap should not unite adjacent address ranges
with different relocated addresses. Instead, it should leave adjacent address ranges
as separate ranges. So, the ranges should look like this:

{0,24,17e685c} {24,d8,55afe20}


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142936

Files:
  llvm/include/llvm/ADT/AddressRanges.h
  llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/lib/DWARFLinker/DWARFStreamer.cpp
  llvm/lib/Support/AddressRanges.cpp
  llvm/lib/Support/CMakeLists.txt
  llvm/unittests/Support/AddressRangeTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142936.493416.patch
Type: text/x-patch
Size: 31849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230130/138814c7/attachment.bin>


More information about the llvm-commits mailing list