mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135673 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -51,8 +51,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
|
||||
Constant::getNullValue(Type::getInt32Ty(Context)));
|
||||
unsigned NumElements = 0;
|
||||
if (Array) {
|
||||
Args[2] = ConstantExpr::getGetElementPtr(Array, &GEPIndices[0],
|
||||
GEPIndices.size());
|
||||
Args[2] = ConstantExpr::getGetElementPtr(Array, GEPIndices);
|
||||
NumElements =
|
||||
cast<ArrayType>(Array->getType()->getElementType())->getNumElements();
|
||||
} else {
|
||||
@@ -120,7 +119,7 @@ void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
|
||||
Indices[0] = Constant::getNullValue(Type::getInt32Ty(Context));
|
||||
Indices[1] = ConstantInt::get(Type::getInt32Ty(Context), CounterNum);
|
||||
Constant *ElementPtr =
|
||||
ConstantExpr::getGetElementPtr(CounterArray, &Indices[0], Indices.size());
|
||||
ConstantExpr::getGetElementPtr(CounterArray, Indices);
|
||||
|
||||
// Load, increment and store the value back.
|
||||
Value *OldVal = new LoadInst(ElementPtr, "OldFuncCounter", InsertPos);
|
||||
|
Reference in New Issue
Block a user