[all-commits] [llvm/llvm-project] 88c213: [DWARFLinker][dsymutil][NFC] Move DwarfStreamer in...

avl-llvm via All-commits all-commits at lists.llvm.org
Tue Apr 7 11:26:28 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 88c2137b6d49f88186d0957a4e2d8030a3967334
      https://github.com/llvm/llvm-project/commit/88c2137b6d49f88186d0957a4e2d8030a3967334
  Author: Alexey Lapshin <a.v.lapshin at mail.ru>
  Date:   2020-04-07 (Tue, 07 Apr 2020)

  Changed paths:
    A llvm/include/llvm/DWARFLinker/DWARFStreamer.h
    M llvm/lib/DWARFLinker/CMakeLists.txt
    A llvm/lib/DWARFLinker/DWARFStreamer.cpp
    M llvm/tools/dsymutil/CMakeLists.txt
    M llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
    M llvm/tools/dsymutil/DwarfLinkerForBinary.h
    R llvm/tools/dsymutil/DwarfStreamer.cpp
    R llvm/tools/dsymutil/DwarfStreamer.h
    M llvm/tools/dsymutil/LinkUtils.h

  Log Message:
  -----------
  [DWARFLinker][dsymutil][NFC] Move DwarfStreamer into DWARFLinker.

For implementing "remove obsolete debug info in lld", it is neccesary
to have DWARF generation code implementation. dsymutil uses DwarfStreamer
for that purpose. DwarfStreamer uses AsmPrinter. It is considered OK
to use AsmPrinter based code in lld(D74169). This patch moves
DwarfStreamer implementation into DWARFLinker, so that it could be reused
from lld.

Generally, a better place for such a common DWARF generation code would be
not DWARFLinker but an additional separate library. Such a library could
contain a single version of DWARF generation routines and could also
be independent of AsmPrinter. At the current moment, DwarfStreamer
does not pretend to be such a general implementation of DWARF generation.
So I decided to put it into DWARFLinker since it is the only user
of DwarfStreamer.

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

Reviewed By: JDevlieghere

Differential revision: https://reviews.llvm.org/D77169




More information about the All-commits mailing list