[dsymutil] Set linked unit start offset early. NFC.
authorFrederic Riss <friss@apple.com>
Fri, 6 Mar 2015 23:22:50 +0000 (23:22 +0000)
committerFrederic Riss <friss@apple.com>
Fri, 6 Mar 2015 23:22:50 +0000 (23:22 +0000)
commit1edd6edd600e38c09f1a2b8247a3dd3ef1b9dc12
tree674c1c23f96c9c49f34b1310f3f9cd15f349fc12
parent7557b1a4df3fe293be058eaef10bd63943f3c043
[dsymutil] Set linked unit start offset early. NFC.

The start offset of a linked unit is known before starting to clone
its DIEs. Handling DW_FORM_ref_addr attributes requires that this
offset is set while cloning the unit. Split CompileUnit::computeOffsets()
into setStartOffset() and computeNextUnitOffset() and call them
repsectively before cloning the DIEs and right after.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231530 91177308-0d34-0410-b5e6-96231b3b80d8
tools/dsymutil/DwarfLinker.cpp