[Mlir-commits] [mlir] [mlir][IR] Mark `getParentBlock()` and `getParentRegion()` as const (NFC) (PR #151915)
Matthias Springer
llvmlistbot at llvm.org
Mon Aug 4 01:46:12 PDT 2025
https://github.com/matthias-springer approved this pull request.
I'm not quite sure how to interpret this document: https://mlir.llvm.org/docs/Rationale/UsageOfConst/
It suggests that there function like these should not be `const`. E.g.: `you should never see a const method on Operation`. Presumably that also extends to `Value`?
However, we have many const functions in `Value.h` today. So for consistency reasons, it makes sense to me to add the `const` keyword here.
https://github.com/llvm/llvm-project/pull/151915
More information about the Mlir-commits
mailing list