aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp4
-rw-r--r--lib/Transforms/Instrumentation/RSProfiling.cpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index 5e6b71a3e4..70ce86a2c3 100644
--- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/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/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp
index 31b255feb0..2afc0cb272 100644
--- a/lib/Transforms/Instrumentation/RSProfiling.cpp
+++ b/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.