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:
- 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.