add a const version of stripPointerCasts
authorChris Lattner <sabre@nondot.org>
Mon, 16 Jun 2008 06:43:06 +0000 (06:43 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 16 Jun 2008 06:43:06 +0000 (06:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52305 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Value.h

index 26d2d1df4c65f66fd389285596694c3bb6b9143c..6d4d7cc74ac9bea27ed04d14d7e59f6f12fef077 100644 (file)
@@ -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<Value*>(this)->stripPointerCasts();
+  }
 };
 
 inline std::ostream &operator<<(std::ostream &OS, const Value &V) {