summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 18:55:55 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 18:55:55 +0000
commit487375e9a2c9bd64869aab778ef26770ed4bef67 (patch)
treec6360f5a96c7c7ced626d13ed8c98de3f99391ec /llvm/lib/Transforms/Instrumentation
parentade90fd1ba0c99780076c11ff0a23c2aa5319228 (diff)
downloadbcm5719-llvm-487375e9a2c9bd64869aab778ef26770ed4bef67.tar.gz
bcm5719-llvm-487375e9a2c9bd64869aab778ef26770ed4bef67.zip
Move ConstantExpr to 2.5 API.
llvm-svn: 77494
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp4
-rw-r--r--llvm/lib/Transforms/Instrumentation/RSProfiling.cpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index 5e6b71a3e4b..70ce86a2c37 100644
--- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
@@ -46,7 +46,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
std::vector<Constant*> GEPIndices(2, Context.getNullValue(Type::Int32Ty));
unsigned NumElements = 0;
if (Array) {
- Args[2] = Context.getConstantExprGetElementPtr(Array, &GEPIndices[0],
+ Args[2] = ConstantExpr::getGetElementPtr(Array, &GEPIndices[0],
GEPIndices.size());
NumElements =
cast<ArrayType>(Array->getType()->getElementType())->getNumElements();
@@ -113,7 +113,7 @@ void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
Indices[0] = Context.getNullValue(Type::Int32Ty);
Indices[1] = ConstantInt::get(Type::Int32Ty, CounterNum);
Constant *ElementPtr =
- Context.getConstantExprGetElementPtr(CounterArray, &Indices[0],
+ ConstantExpr::getGetElementPtr(CounterArray, &Indices[0],
Indices.size());
// Load, increment and store the value back.
diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
index 31b255feb02..2afc0cb2729 100644
--- a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
@@ -352,8 +352,7 @@ void RSProfilers_std::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNu
std::vector<Constant*> Indices(2);
Indices[0] = BB->getContext().getNullValue(Type::Int32Ty);
Indices[1] = ConstantInt::get(Type::Int32Ty, CounterNum);
- Constant *ElementPtr =
- BB->getContext().getConstantExprGetElementPtr(CounterArray,
+ Constant *ElementPtr =ConstantExpr::getGetElementPtr(CounterArray,
&Indices[0], 2);
// Load, increment and store the value back.
OpenPOWER on IntegriCloud