diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-03 22:07:33 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-03 22:07:33 +0000 |
commit | 43ee5f7c08bd5a91cdd8681df20a7d1df26a1024 (patch) | |
tree | 2819e322a8671fd4e7a69ca28c325fe819735a43 /include/llvm/Constant.h | |
parent | c8bfb7a49d6de5a6259df7cbf3b320f232b0d022 (diff) | |
download | llvm-43ee5f7c08bd5a91cdd8681df20a7d1df26a1024.tar.gz llvm-43ee5f7c08bd5a91cdd8681df20a7d1df26a1024.tar.bz2 llvm-43ee5f7c08bd5a91cdd8681df20a7d1df26a1024.tar.xz |
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
Diffstat (limited to 'include/llvm/Constant.h')
-rw-r--r-- | include/llvm/Constant.h | 6 |
1 files changed, 6 insertions, 0 deletions
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<typename T> 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 |