diff options
author | Sterling-Augustine <56981066+Sterling-Augustine@users.noreply.github.com> | 2025-06-26 11:23:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-26 11:23:46 -0700 |
commit | cbf781f0bdf2f680abbe784faedeefd6f84c246e (patch) | |
tree | 0211edb52770aa15ccf389041fd43e21d039ca29 /llvm/tools/llvm-objdump | |
parent | f2991bf791091967259d1235604534bcef73612c (diff) | |
download | llvm-cbf781f0bdf2f680abbe784faedeefd6f84c246e.zip llvm-cbf781f0bdf2f680abbe784faedeefd6f84c246e.tar.gz llvm-cbf781f0bdf2f680abbe784faedeefd6f84c246e.tar.bz2 |
[NFC][DebugInfo][DWARF] Create new low-level dwarf library (#145081)
This is the culmination of a series of changes described in [1].
Although somewhat large by line count, it is almost entirely mechanical,
creating a new library in DebugInfo/DWARF/LowLevel. This new library has
very minimal dependencies, allowing it to be used from more places than
the normal DebugInfo/DWARF library--in particular from MC.
I am happy to put it in another location, or to structure it differently
if that makes sense. Some have suggested in BinaryFormat, but it is not
a great fit there. But if that makes more sense to the reviewers, I can
do that.
Another possibility would be to use pass-through headers to allow
clients who don't care to depend only on DebugInfo/DWARF. This would be
a much less invasive change, and perhaps easier for clients. But also a
system that hides details.
Either way, I'm open.
1.
https://discourse.llvm.org/t/rfc-debuginfo-dwarf-refactor-into-to-lower-and-higher-level-libraries/86665/2
Diffstat (limited to 'llvm/tools/llvm-objdump')
-rw-r--r-- | llvm/tools/llvm-objdump/CMakeLists.txt | 1 | ||||
-rw-r--r-- | llvm/tools/llvm-objdump/SourcePrinter.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/llvm-objdump/CMakeLists.txt b/llvm/tools/llvm-objdump/CMakeLists.txt index 0306736..7e3197f 100644 --- a/llvm/tools/llvm-objdump/CMakeLists.txt +++ b/llvm/tools/llvm-objdump/CMakeLists.txt @@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS BinaryFormat DebugInfoBTF DebugInfoDWARF + DebugInfoDWARFLowLevel Demangle MC MCDisassembler diff --git a/llvm/tools/llvm-objdump/SourcePrinter.cpp b/llvm/tools/llvm-objdump/SourcePrinter.cpp index bf33637..3630502 100644 --- a/llvm/tools/llvm-objdump/SourcePrinter.cpp +++ b/llvm/tools/llvm-objdump/SourcePrinter.cpp @@ -15,7 +15,8 @@ #include "SourcePrinter.h" #include "llvm-objdump.h" #include "llvm/ADT/SmallSet.h" -#include "llvm/DebugInfo/DWARF/DWARFExpression.h" +#include "llvm/DebugInfo/DWARF/DWARFExpressionPrinter.h" +#include "llvm/DebugInfo/DWARF/LowLevel/DWARFExpression.h" #include "llvm/Support/FormatVariadic.h" #define DEBUG_TYPE "objdump" @@ -45,7 +46,7 @@ void LiveVariable::print(raw_ostream &OS, const MCRegisterInfo &MRI) const { return {}; }; - DWARFExpressionPrinter::printCompact(&Expression, OS, GetRegName); + printDwarfExpressionCompact(&Expression, OS, GetRegName); } void LiveVariablePrinter::addVariable(DWARFDie FuncDie, DWARFDie VarDie) { |