[PATCH] D113934: [llvm] adapt DWARFExpression.h for 6b9b86db9dd974585a5c71cf2e5231d1e3385f7c

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 13:12:14 PST 2021


dexonsmith added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h:106
       : public iterator_facade_base<iterator, std::forward_iterator_tag,
                                     Operation> {
     friend class DWARFExpression;
----------------
Should this be `const Operation`?


================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h:110
     uint64_t Offset;
-    Operation Op;
+    mutable Operation Op;
     iterator(const DWARFExpression *Expr, uint64_t Offset)
----------------
Do callers really want/need to modify the `Operation`?


================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h:127
 
-    class Operation &operator*() {
+    class Operation &operator*() const {
       return Op;
----------------
Wondering if this should be `const class Operation &operator*`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113934



More information about the llvm-commits mailing list