[all-commits] [llvm/llvm-project] adabfb: [DWARFLinker][NFC] Set the target DWARF version ex...

avl-llvm via All-commits all-commits at lists.llvm.org
Thu Sep 15 06:12:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: adabfb5e32fd208f7af6d9fd70bb5094d5fdaab6
      https://github.com/llvm/llvm-project/commit/adabfb5e32fd208f7af6d9fd70bb5094d5fdaab6
  Author: Alexey Lapshin <a.v.lapshin at mail.ru>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M llvm/include/llvm/DWARFLinker/DWARFLinker.h
    M llvm/lib/DWARFLinker/DWARFLinker.cpp
    M llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
    M llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp

  Log Message:
  -----------
  [DWARFLinker][NFC] Set the target DWARF version explicitly.

Currently, DWARFLinker determines the target DWARF version internally.
It examines incoming object files, detects maximal
DWARF version and uses that version for the output file.
This patch allows explicitly setting output DWARF version by the consumer
of DWARFLinker. So that DWARFLinker uses a specified version instead
of autodetected one. It allows consumers to use different logic for
setting the target DWARF version. f.e. instead of the maximally used version
someone could set a higher version to convert from DWARFv4 to DWARFv5
(This possibility is not supported yet, but it would be good if
the interface will support it). Or another variant is to set the target
version through the command line. In this patch, the autodetection is moved
into the consumers(DwarfLinkerForBinary.cpp, DebugInfoLinker.cpp).

Differential Revision: https://reviews.llvm.org/D132755




More information about the All-commits mailing list