From b5f6d0c15a945e597b462c99183430bd1184722c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 19 Feb 2007 07:34:47 +0000 Subject: eliminate use of deprecated apis llvm-svn: 34417 --- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Instrumentation/RSProfiling.cpp') diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp index fc464c00ec2..2b3adb27cd6 100644 --- a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -335,7 +335,8 @@ void RSProfilers_std::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNu std::vector 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); -- cgit v1.2.3