summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ShadowStackGC.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-22 08:16:57 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-22 08:16:57 +0000
commit040dd82f4497a1dc00d1b42df39274150c1b8fdb (patch)
tree0c607a36e2f78ed5efabd20675e324bc9109d3e8 /llvm/lib/CodeGen/ShadowStackGC.cpp
parent43025a08699db9ca83c4f5a4607e056aab470b04 (diff)
downloadbcm5719-llvm-040dd82f4497a1dc00d1b42df39274150c1b8fdb.tar.gz
bcm5719-llvm-040dd82f4497a1dc00d1b42df39274150c1b8fdb.zip
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef. llvm-svn: 135761
Diffstat (limited to 'llvm/lib/CodeGen/ShadowStackGC.cpp')
-rw-r--r--llvm/lib/CodeGen/ShadowStackGC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ShadowStackGC.cpp b/llvm/lib/CodeGen/ShadowStackGC.cpp
index 2f1d223cf96..612c9fca58f 100644
--- a/llvm/lib/CodeGen/ShadowStackGC.cpp
+++ b/llvm/lib/CodeGen/ShadowStackGC.cpp
@@ -340,7 +340,7 @@ ShadowStackGC::CreateGEP(LLVMContext &Context, IRBuilder<> &B, Value *BasePtr,
Value *Indices[] = { ConstantInt::get(Type::getInt32Ty(Context), 0),
ConstantInt::get(Type::getInt32Ty(Context), Idx),
ConstantInt::get(Type::getInt32Ty(Context), Idx2) };
- Value* Val = B.CreateGEP(BasePtr, Indices, Indices + 3, Name);
+ Value* Val = B.CreateGEP(BasePtr, Indices, Name);
assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant");
@@ -352,7 +352,7 @@ ShadowStackGC::CreateGEP(LLVMContext &Context, IRBuilder<> &B, Value *BasePtr,
int Idx, const char *Name) {
Value *Indices[] = { ConstantInt::get(Type::getInt32Ty(Context), 0),
ConstantInt::get(Type::getInt32Ty(Context), Idx) };
- Value *Val = B.CreateGEP(BasePtr, Indices, Indices + 2, Name);
+ Value *Val = B.CreateGEP(BasePtr, Indices, Name);
assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant");
OpenPOWER on IntegriCloud