Skip to content

Commit b2c262c

Browse files
committed
[lldb][NFC] Define DWARFDIE::children out-of-line instead of using template magic
As pointed out by David in D103172 (thanks!) Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D106743
1 parent 63c566b commit b2c262c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,3 +448,7 @@ bool DWARFDIE::GetDIENamesAndRanges(
448448
} else
449449
return false;
450450
}
451+
452+
llvm::iterator_range<DWARFDIE::child_iterator> DWARFDIE::children() const {
453+
return llvm::make_range(child_iterator(*this), child_iterator());
454+
}

lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,9 @@ class DWARFDIE : public DWARFBaseDIE {
9090
int &decl_line, int &decl_column, int &call_file,
9191
int &call_line, int &call_column,
9292
lldb_private::DWARFExpression *frame_base) const;
93+
9394
/// The range of all the children of this DIE.
94-
///
95-
/// This is a template just because child_iterator is not completely defined
96-
/// at this point.
97-
template <typename T = child_iterator>
98-
llvm::iterator_range<T> children() const {
99-
return llvm::make_range(T(*this), T());
100-
}
95+
llvm::iterator_range<child_iterator> children() const;
10196
};
10297

10398
class DWARFDIE::child_iterator

0 commit comments

Comments
 (0)