Skip to content

Commit

Permalink
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF opt…
Browse files Browse the repository at this point in the history
…imizing 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
  • Loading branch information
avl-llvm committed Jan 23, 2020
1 parent 784204f commit a8c5a46
Show file tree
Hide file tree
Showing 7 changed files with 3,397 additions and 3,078 deletions.
6 changes: 6 additions & 0 deletions llvm/include/llvm/CodeGen/DIE.h
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,9 @@ class DIELoc : public DIEValueList {
///
unsigned ComputeSize(const AsmPrinter *AP) const;

// TODO: move setSize() and Size to DIEValueList.
void setSize(unsigned size) { Size = size; }

/// BestForm - Choose the best form for data.
///
dwarf::Form BestForm(unsigned DwarfVersion) const {
Expand Down Expand Up @@ -944,6 +947,9 @@ class DIEBlock : public DIEValueList {
///
unsigned ComputeSize(const AsmPrinter *AP) const;

// TODO: move setSize() and Size to DIEValueList.
void setSize(unsigned size) { Size = size; }

/// BestForm - Choose the best form for data.
///
dwarf::Form BestForm() const {
Expand Down
Loading

0 comments on commit a8c5a46

Please sign in to comment.