[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
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:
- Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile); bool link(); void setOptions;
- Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary into lib/DWARFLinker.
- Renames RelocationManager into AddressesManager.
- 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.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, debug-info
Differential Revision: https://reviews.llvm.org/D72915