[PATCH] [Statepoints][NFC] Constify accessors on Statepoint.
Sanjoy Das
sanjoy at playingwithpointers.com
Fri Jun 26 11:49:48 PDT 2015
In http://reviews.llvm.org/D10755#195561, @reames wrote:
> Returning a pointer to a non-const component of the underlying call from
> a const function seems deceptive.
I wouldn't quite call it deceptive -- `CallSite` uses the same idiom, and the `const` conveys that, for instance, there is no caching going on in the background and the calling `getArgument` is reallyt idempotent.
> ValueTy *getActualCallee() const {
>
> I'm open to being convinced that's reasonable, but I'd prefer to see
> those left non-const or overrides which return pointers-to-const added.
`ImmutableStatepoint` will return `const Value *`s as usual.
Having said that, I'm not going to argue that this change is a particularly useful one; the //real// reason behind this change and http://reviews.llvm.org/D10756 is to make `Statepoint` more similar to `CallSite` with the eventual goal of merging these classes.
> Philip
http://reviews.llvm.org/D10755
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list