[llvm] [llvm-objdump] Add inlined function display support (PR #142246)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 07:43:48 PDT 2025
================
@@ -22,60 +23,108 @@
namespace llvm {
namespace objdump {
+/// Base class for representing the location of a source-level variable or
+/// an inlined function.
+class LiveElement {
+protected:
+ const char *Name;
+ DWARFUnit *Unit;
+ const DWARFDie FuncDie;
+
+public:
+ LiveElement(const char *Name, DWARFUnit *Unit, const DWARFDie FuncDie)
+ : Name(Name), Unit(Unit), FuncDie(FuncDie) {}
+
+ virtual ~LiveElement() {};
+ const char *getName() const { return Name; }
+ DWARFUnit *getDwarfUnit() const { return Unit; }
+ const DWARFDie getFuncDie() const { return FuncDie; }
----------------
gulfemsavrun wrote:
I removed `getDwarfUnit()` and `getFuncDie()`, but I kept `getName()` by `LiveElementPrinter` (originally LiveVariablePrinter) class methods.
https://github.com/llvm/llvm-project/pull/142246
More information about the llvm-commits
mailing list