Skip to content

Commit 9b82e85

Browse files
authored
[DWARF] Generalize DWARFTypePrinter to a template class (#109459)
This generalizes DWARFTypePrinter class to a template class so that it can be reused for lldb's DWARFDIE type. This is a split of #90008. The difference is that this doesn't have `Visitor` template parameter which can be added later if necessary.
1 parent 75611ca commit 9b82e85

File tree

5 files changed

+751
-697
lines changed

5 files changed

+751
-697
lines changed

llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class DWARFDie {
4444
const DWARFDebugInfoEntry *Die = nullptr;
4545

4646
public:
47+
using DWARFFormValue = llvm::DWARFFormValue;
4748
DWARFDie() = default;
4849
DWARFDie(DWARFUnit *Unit, const DWARFDebugInfoEntry *D) : U(Unit), Die(D) {}
4950

@@ -183,6 +184,8 @@ class DWARFDie {
183184

184185
DWARFDie resolveTypeUnitReference() const;
185186

187+
DWARFDie resolveReferencedType(dwarf::Attribute Attr) const;
188+
DWARFDie resolveReferencedType(const DWARFFormValue &V) const;
186189
/// Extract the range base attribute from this DIE as absolute section offset.
187190
///
188191
/// This is a utility function that checks for either the DW_AT_rnglists_base

0 commit comments

Comments
 (0)