This is an archive of the discontinued LLVM Phabricator instance.

[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
ClosedPublic

Authored by avl on Jan 17 2020, 4:52 AM.

Details

Summary

The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:

http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.

This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:

  1. Creates lib/DWARFLinker interface :

    void addObjectFile(DwarfLinkerObjFile &ObjFile); bool link(); void setOptions;
  1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary into lib/DWARFLinker.
  2. Renames RelocationManager into AddressesManager.
  3. Remarks creation logic moved from separate parallel execution into object file loading routine.

Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.

Diff Detail

Event Timeline

avl created this revision.Jan 17 2020, 4:52 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added subscribers: jfb, hiraditya. · View Herald Transcript

Unit tests: pass. 61944 tests passed, 0 failed and 783 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

JDevlieghere accepted this revision.Jan 21 2020, 1:05 PM
This revision is now accepted and ready to land.Jan 21 2020, 1:05 PM
This revision was automatically updated to reflect the committed changes.
avl added a comment.Jan 23 2020, 11:41 AM

@JDevlieghere Jonas, Thank you for reviewing this set of patches for dsymutil!

llvm/tools/dsymutil/DwarfLinkerForBinary.h