[PATCH] D49679: [DebugInfo] Have custom std::reverse_iterator<DWARFDie>
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 15:04:35 PDT 2018
dblaikie accepted this revision.
dblaikie added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h:285-286
-class DWARFDie::attribute_iterator :
- public iterator_facade_base<attribute_iterator, std::forward_iterator_tag,
- const DWARFAttribute> {
+class DWARFDie::attribute_iterator
+ : public iterator_facade_base<attribute_iterator, std::forward_iterator_tag,
+ const DWARFAttribute> {
----------------
extraneous/extra formatting?
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h:295-324
+ friend bool operator==(const attribute_iterator &LHS,
+ const attribute_iterator &RHS);
+
/// Update the attribute index and attempt to read the attribute value. If the
/// attribute is able to be read, update AttrValue and the Index member
/// variable. If the attribute value is not able to be read, an appropriate
/// error will be set if the Err member variable is non-NULL and the iterator
----------------
Looks like an unrelated change that can be committed separately?
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h:435-436
+
+ // FIXME: We should be able to specify the equals operator as a friend, but
+ // that causes the compiler to get confused.
+ bool equals(const reverse_iterator<llvm::DWARFDie::iterator> &RHS) const {
----------------
Could you be more precise - what goes wrong/what error is produced?
https://reviews.llvm.org/D49679
More information about the llvm-commits
mailing list