diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-24 23:12:02 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-24 23:12:02 +0000 |
commit | eacb44d0bb89c608c4465b7900eea3afc0f0be0d (patch) | |
tree | c7390f63d90fc0c0ac483a90275863f41b69c085 /include/llvm/Support/IRBuilder.h | |
parent | 2f099ebb73bac294783dd5ce28631d5f72d5438e (diff) | |
download | external_llvm-eacb44d0bb89c608c4465b7900eea3afc0f0be0d.tar.gz external_llvm-eacb44d0bb89c608c4465b7900eea3afc0f0be0d.tar.bz2 external_llvm-eacb44d0bb89c608c4465b7900eea3afc0f0be0d.zip |
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/IRBuilder.h')
-rw-r--r-- | include/llvm/Support/IRBuilder.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 835a28622f..ac134ec303 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -370,7 +370,7 @@ public: return Insert(GetElementPtrInst::Create(Ptr, Idx), Name); } Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0, const char *Name = "") { - Value *Idx = Context.getConstantInt(Type::Int32Ty, Idx0); + Value *Idx = ConstantInt::get(Type::Int32Ty, Idx0); if (Constant *PC = dyn_cast<Constant>(Ptr)) return Folder.CreateGetElementPtr(PC, &Idx, 1); @@ -380,8 +380,8 @@ public: Value *CreateConstGEP2_32(Value *Ptr, unsigned Idx0, unsigned Idx1, const char *Name = "") { Value *Idxs[] = { - Context.getConstantInt(Type::Int32Ty, Idx0), - Context.getConstantInt(Type::Int32Ty, Idx1) + ConstantInt::get(Type::Int32Ty, Idx0), + ConstantInt::get(Type::Int32Ty, Idx1) }; if (Constant *PC = dyn_cast<Constant>(Ptr)) @@ -390,7 +390,7 @@ public: return Insert(GetElementPtrInst::Create(Ptr, Idxs, Idxs+2), Name); } Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0, const char *Name = "") { - Value *Idx = Context.getConstantInt(Type::Int64Ty, Idx0); + Value *Idx = ConstantInt::get(Type::Int64Ty, Idx0); if (Constant *PC = dyn_cast<Constant>(Ptr)) return Folder.CreateGetElementPtr(PC, &Idx, 1); @@ -400,8 +400,8 @@ public: Value *CreateConstGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1, const char *Name = "") { Value *Idxs[] = { - Context.getConstantInt(Type::Int64Ty, Idx0), - Context.getConstantInt(Type::Int64Ty, Idx1) + ConstantInt::get(Type::Int64Ty, Idx0), + ConstantInt::get(Type::Int64Ty, Idx1) }; if (Constant *PC = dyn_cast<Constant>(Ptr)) @@ -428,7 +428,7 @@ public: } Value *CreateGlobalStringPtr(const char *Str = "", const char *Name = "") { Value *gv = CreateGlobalString(Str, Name); - Value *zero = Context.getConstantInt(Type::Int32Ty, 0); + Value *zero = ConstantInt::get(Type::Int32Ty, 0); Value *Args[] = { zero, zero }; return CreateGEP(gv, Args, Args+2, Name); } |