[PATCH] D113957: DebugInfo: Stop modifying Operation::Error inside of verify()

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 17:48:47 PST 2021


dexonsmith added a comment.

Oh, a couple of comments on alternatives:

- I considered moving the `mutable` keyword from `iterator::Operation` to `Operation::Error`, just limiting its scope. But since the change is completely ignored and it's reasonable to have a const-qualified `verify()` function this seems simpler.
- Another approach would be to make `Operation::verify()` a static local function private to `DWARFExpression.cpp`. It accesses private fields, but it'd be easy enough to rewrite it to use accessors.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113957



More information about the llvm-commits mailing list