diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-02-20 05:55:46 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-02-20 05:55:46 +0000 |
| commit | eb41bddfdf6378ce407af2c03ee21fb1227eceec (patch) | |
| tree | 80ef473ac986bd90873383529e5460425c9deadf /include | |
| parent | e0e769607c8d6569daea0ff55a99fa2532029342 (diff) | |
| download | llvm-eb41bddfdf6378ce407af2c03ee21fb1227eceec.tar.gz llvm-eb41bddfdf6378ce407af2c03ee21fb1227eceec.tar.bz2 llvm-eb41bddfdf6378ce407af2c03ee21fb1227eceec.tar.xz | |
Clean up the internals of the ConstantInt machinery
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/llvm/Constants.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 1ee00aadb3..93c298e76e 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -44,10 +44,8 @@ protected: uint64_t Val; protected: ConstantInt(const ConstantInt &); // DO NOT IMPLEMENT - ConstantInt(const Type *Ty, uint64_t V); - ConstantInt(const Type *Ty, int64_t V); - ConstantInt(bool V); - friend struct ConstantCreator<ConstantInt, Type, uint64_t>; + ConstantInt(const IntegerType *Ty, uint64_t V); + friend struct ConstantCreator<ConstantInt, IntegerType, uint64_t>; public: /// Return the constant as a 64-bit unsigned integer value after it /// has been zero extended as appropriate for the type of this constant. @@ -77,12 +75,12 @@ public: static inline ConstantInt *getTrue() { static ConstantInt *T = 0; if (T) return T; - return T = new ConstantInt(true); + return T = new ConstantInt(Type::Int1Ty, 1); } static inline ConstantInt *getFalse() { static ConstantInt *F = 0; if (F) return F; - return F = new ConstantInt(false); + return F = new ConstantInt(Type::Int1Ty, 0); } /// Return a ConstantInt with the specified value for the specified type. The |
