diff options
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/ShadowStackGC.cpp | 4 | 
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");  | 

