[PATCH] D113958: DebugInfo: Make DWARFExpression::iterator a const iterator

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 16 09:17:12 PST 2021


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Looks good to me - I don't mind it still being called `iterator` rather than `const_iterator` - if it's the only iterator over the range anyway. (ArrayRef's iterator isn't called `const_iterator` for instance, even though it is only constant)



================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h:133
 
-    class Operation &operator*() const {
+    const class Operation &operator*() const {
       return Op;
----------------
Side note: the `class` keyword here could be removed.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113958/new/

https://reviews.llvm.org/D113958



More information about the llvm-commits mailing list