[llvm] [llvm-objdump] Add inlined function display support (PR #142246)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 5 01:31:06 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; }
+
+ virtual bool liveAtAddress(object::SectionedAddress Addr) = 0;
----------------
jh7370 wrote:
Should this method be `const`?
https://github.com/llvm/llvm-project/pull/142246
More information about the llvm-commits
mailing list