Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Returning a pointer to a non-const component of the underlying call from
a const function seems deceptive.
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.
Philip
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 D10756 is to make Statepoint more similar to CallSite with the eventual goal of merging these classes.
Philip