Skip to content

Commit a8c5a46

Browse files
committed
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
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. 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
1 parent 784204f commit a8c5a46

File tree

7 files changed

+3397
-3078
lines changed

7 files changed

+3397
-3078
lines changed

llvm/include/llvm/CodeGen/DIE.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,9 @@ class DIELoc : public DIEValueList {
910910
///
911911
unsigned ComputeSize(const AsmPrinter *AP) const;
912912

913+
// TODO: move setSize() and Size to DIEValueList.
914+
void setSize(unsigned size) { Size = size; }
915+
913916
/// BestForm - Choose the best form for data.
914917
///
915918
dwarf::Form BestForm(unsigned DwarfVersion) const {
@@ -944,6 +947,9 @@ class DIEBlock : public DIEValueList {
944947
///
945948
unsigned ComputeSize(const AsmPrinter *AP) const;
946949

950+
// TODO: move setSize() and Size to DIEValueList.
951+
void setSize(unsigned size) { Size = size; }
952+
947953
/// BestForm - Choose the best form for data.
948954
///
949955
dwarf::Form BestForm() const {

0 commit comments

Comments
 (0)