summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-21 14:31:17 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-21 14:31:17 +0000
commited8db7d9df395497d54ea9cecf1cecdad674cd7e (patch)
tree4da14cc7a50cc83e03bd6353a059c10b5a719eee /llvm/lib/Transforms/Instrumentation
parent95f1ebd41b103eba1cb64305e9cc924527a8744f (diff)
downloadbcm5719-llvm-ed8db7d9df395497d54ea9cecf1cecdad674cd7e.tar.gz
bcm5719-llvm-ed8db7d9df395497d54ea9cecf1cecdad674cd7e.zip
Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index 0ebab33f5cb..0263c75c752 100644
--- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
@@ -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);
OpenPOWER on IntegriCloud