[PATCH] D158598: [RFC][GlobalISel] Remove const from most MatchTableExecutor methods
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 15:33:07 PDT 2023
arsenm added a comment.
In D158598#4609625 <https://reviews.llvm.org/D158598#4609625>, @Pierre-vh wrote:
> Additional context: While refactoring this area for some upcoming diffs (removing the deprecated GICombiner backend), I changed some data members from `T&` to `T` and got a lot of errors due to this.
> While I usually favor const-correctness as much as possible, it's really never respected here. We always use references or pointers, which means we can always call non-const functions on those even in a const function.
>
> Example:
>
> struct Foo {
> int foo() {
> return 0;
> }
> };
The foo here would just have to be const? don't see the issue
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158598/new/
https://reviews.llvm.org/D158598
More information about the llvm-commits
mailing list