Skip to content

Commit

Permalink
[lldb][NFC] Define DWARFDIE::children out-of-line instead of using te…
Browse files Browse the repository at this point in the history
…mplate magic

As pointed out by David in D103172 (thanks!)

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D106743
  • Loading branch information
Teemperor committed Aug 11, 2021
1 parent 63c566b commit b2c262c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 4 additions & 0 deletions lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
Expand Up @@ -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());
}
9 changes: 2 additions & 7 deletions lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
Expand Up @@ -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
Expand Down

0 comments on commit b2c262c

Please sign in to comment.