From 43ee5f7c08bd5a91cdd8681df20a7d1df26a1024 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 3 Aug 2009 22:07:33 +0000 Subject: Add a new Constant::getIntegerValue helper function, and convert a few places in InstCombine to use it, to fix problems handling pointer types. This fixes the recent llvm-gcc bootstrap error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78005 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Constant.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/llvm/Constant.h') diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 3b3089748e..a42c7d4371 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -17,6 +17,8 @@ #include "llvm/User.h" namespace llvm { + class APInt; + template class SmallVectorImpl; class LLVMContext; @@ -142,6 +144,10 @@ public: /// its bits set to true. /// @brief Get the all ones value static Constant* getAllOnesValue(const Type* Ty); + + /// getIntegerValue - Return the value for an integer or pointer constant, + /// or a vector thereof, with the given scalar value. + static Constant* getIntegerValue(const Type* Ty, const APInt &V); }; } // End llvm namespace -- cgit v1.2.3