mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135761 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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");
|
||||
|
||||
|
Reference in New Issue
Block a user