[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
This commit is contained in:
Raphael Isemann 2021-08-11 19:14:56 +02:00
parent 63c566b1fd
commit b2c262cfb1
2 changed files with 6 additions and 7 deletions

View File

@ -448,3 +448,7 @@ bool DWARFDIE::GetDIENamesAndRanges(
} else
return false;
}
llvm::iterator_range<DWARFDIE::child_iterator> DWARFDIE::children() const {
return llvm::make_range(child_iterator(*this), child_iterator());
}

View File

@ -90,14 +90,9 @@ public:
int &decl_line, int &decl_column, int &call_file,
int &call_line, int &call_column,
lldb_private::DWARFExpression *frame_base) const;
/// The range of all the children of this DIE.
///
/// This is a template just because child_iterator is not completely defined
/// at this point.
template <typename T = child_iterator>
llvm::iterator_range<T> children() const {
return llvm::make_range(T(*this), T());
}
llvm::iterator_range<child_iterator> children() const;
};
class DWARFDIE::child_iterator