aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/RSProfiling.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Instrumentation/RSProfiling.cpp')
-rw-r--r--lib/Transforms/Instrumentation/RSProfiling.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp
index fc464c00ec..2b3adb27cd 100644
--- a/lib/Transforms/Instrumentation/RSProfiling.cpp
+++ b/lib/Transforms/Instrumentation/RSProfiling.cpp
@@ -335,7 +335,8 @@ void RSProfilers_std::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNu
std::vector<Constant*> Indices(2);
Indices[0] = Constant::getNullValue(Type::Int32Ty);
Indices[1] = ConstantInt::get(Type::Int32Ty, CounterNum);
- Constant *ElementPtr = ConstantExpr::getGetElementPtr(CounterArray, Indices);
+ Constant *ElementPtr = ConstantExpr::getGetElementPtr(CounterArray,
+ &Indices[0], 2);
// Load, increment and store the value back.
Value *OldVal = new LoadInst(ElementPtr, "OldCounter", InsertPos);