[PATCH] D49679: [DebugInfo] Have custom std::reverse_iterator<DWARFDie>
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 25 00:59:10 PDT 2018
labath added inline comments.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h:383-384
+private:
+ llvm::DWARFDie Die;
+ bool AtEnd;
+
----------------
dblaikie wrote:
> Could a null DWARFDie (a default constructed one, rather than a non-default constructed one that points to a null DIE) be used as the 'rend' value - avoiding the need for the bool?
for operator-- you need to be able to go back from the "rend" position, which won't work for a default-constructed DWARFDie. I suppose that would be possible if we dropped operator-- (I don't expect anyone will need it), though then this will not be a conforming reverse_iterator.
https://reviews.llvm.org/D49679
More information about the llvm-commits
mailing list