Author: Raphael Isemann Date: 2021-08-11T19:19:41+02:00 New Revision: b2c262cfb12f4fb43177759426b1c6128d4236e4
URL: https://github.com/llvm/llvm-project/commit/b2c262cfb12f4fb43177759426b1c6128d4236e4 DIFF: https://github.com/llvm/llvm-project/commit/b2c262cfb12f4fb43177759426b1c6128d4236e4.diff LOG: [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 Added: Modified: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h Removed: ################################################################################ diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp index dda691eecaccc..529007e31b9e5 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp @@ -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()); +} diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h index 56154055c44dc..5ee44a7632049 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h @@ -90,14 +90,9 @@ class DWARFDIE : public DWARFBaseDIE { 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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits