diff options
Diffstat (limited to 'include/llvm/IR/Constant.h')
-rw-r--r-- | include/llvm/IR/Constant.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/IR/Constant.h b/include/llvm/IR/Constant.h index 99c970ebb633..3b3694e7e60d 100644 --- a/include/llvm/IR/Constant.h +++ b/include/llvm/IR/Constant.h @@ -152,12 +152,13 @@ public: /// hanging off of the globals. void removeDeadConstantUsers() const; - Constant *stripPointerCasts() { + const Constant *stripPointerCasts() const { return cast<Constant>(Value::stripPointerCasts()); } - const Constant *stripPointerCasts() const { - return const_cast<Constant*>(this)->stripPointerCasts(); + Constant *stripPointerCasts() { + return const_cast<Constant*>( + static_cast<const Constant *>(this)->stripPointerCasts()); } }; |