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 | eed707b1e6097aac2bb6b3d47271f6300ace7f2e (patch) | |
tree | c7390f63d90fc0c0ac483a90275863f41b69c085 /lib/CodeGen/ShadowStackGC.cpp | |
parent | e8530a3d8c940fb7710be7e25098b5c3b2c2de19 (diff) |
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 'lib/CodeGen/ShadowStackGC.cpp')
-rw-r--r-- | lib/CodeGen/ShadowStackGC.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/CodeGen/ShadowStackGC.cpp b/lib/CodeGen/ShadowStackGC.cpp index fe843f7250..e3281d2492 100644 --- a/lib/CodeGen/ShadowStackGC.cpp +++ b/lib/CodeGen/ShadowStackGC.cpp @@ -203,8 +203,8 @@ Constant *ShadowStackGC::GetFrameMap(Function &F) { } Constant *BaseElts[] = { - Context.getConstantInt(Type::Int32Ty, Roots.size(), false), - Context.getConstantInt(Type::Int32Ty, NumMeta, false), + ConstantInt::get(Type::Int32Ty, Roots.size(), false), + ConstantInt::get(Type::Int32Ty, NumMeta, false), }; Constant *DescriptorElts[] = { @@ -236,8 +236,8 @@ Constant *ShadowStackGC::GetFrameMap(Function &F) { GlobalVariable::InternalLinkage, FrameMap, "__gc_" + F.getName()); - Constant *GEPIndices[2] = { Context.getConstantInt(Type::Int32Ty, 0), - Context.getConstantInt(Type::Int32Ty, 0) }; + Constant *GEPIndices[2] = { ConstantInt::get(Type::Int32Ty, 0), + ConstantInt::get(Type::Int32Ty, 0) }; return Context.getConstantExprGetElementPtr(GV, GEPIndices, 2); } @@ -342,9 +342,9 @@ void ShadowStackGC::CollectRoots(Function &F) { GetElementPtrInst * ShadowStackGC::CreateGEP(LLVMContext &Context, IRBuilder<> &B, Value *BasePtr, int Idx, int Idx2, const char *Name) { - Value *Indices[] = { Context.getConstantInt(Type::Int32Ty, 0), - Context.getConstantInt(Type::Int32Ty, Idx), - Context.getConstantInt(Type::Int32Ty, Idx2) }; + Value *Indices[] = { ConstantInt::get(Type::Int32Ty, 0), + ConstantInt::get(Type::Int32Ty, Idx), + ConstantInt::get(Type::Int32Ty, Idx2) }; Value* Val = B.CreateGEP(BasePtr, Indices, Indices + 3, Name); assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); @@ -355,8 +355,8 @@ ShadowStackGC::CreateGEP(LLVMContext &Context, IRBuilder<> &B, Value *BasePtr, GetElementPtrInst * ShadowStackGC::CreateGEP(LLVMContext &Context, IRBuilder<> &B, Value *BasePtr, int Idx, const char *Name) { - Value *Indices[] = { Context.getConstantInt(Type::Int32Ty, 0), - Context.getConstantInt(Type::Int32Ty, Idx) }; + Value *Indices[] = { ConstantInt::get(Type::Int32Ty, 0), + ConstantInt::get(Type::Int32Ty, Idx) }; Value *Val = B.CreateGEP(BasePtr, Indices, Indices + 2, Name); assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); |