diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 26d2d1df4c6..6d4d7cc74ac 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -226,6 +226,9 @@ public: /// casts from the specified value, returning the original uncasted value. /// Note that the returned value is guaranteed to have pointer type. Value *stripPointerCasts(); + const Value *stripPointerCasts() const { + return const_cast(this)->stripPointerCasts(); + } }; inline std::ostream &operator<<(std::ostream &OS, const Value &V) {