summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-24 23:12:02 +0000
committerOwen Anderson <resistor@mac.com>2009-07-24 23:12:02 +0000
commitedb4a703255623eef2c56e644f9fdc04cadd7336 (patch)
tree0ef285683687c1c927ff68af16d77b3645e0d66d /llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
parentfcd54f73bf465f9fa7a820344642f848b5285a3b (diff)
downloadbcm5719-llvm-edb4a703255623eef2c56e644f9fdc04cadd7336.tar.gz
bcm5719-llvm-edb4a703255623eef2c56e644f9fdc04cadd7336.zip
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
llvm-svn: 77011
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index b43ca0a4c5c..5e6b71a3e4b 100644
--- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
@@ -55,7 +55,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
// pass null.
Args[2] = Context.getConstantPointerNull(UIntPtr);
}
- Args[3] = Context.getConstantInt(Type::Int32Ty, NumElements);
+ Args[3] = ConstantInt::get(Type::Int32Ty, NumElements);
Instruction *InitCall = CallInst::Create(InitFn, Args.begin(), Args.end(),
"newargc", InsertPos);
@@ -111,7 +111,7 @@ void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
// Create the getelementptr constant expression
std::vector<Constant*> Indices(2);
Indices[0] = Context.getNullValue(Type::Int32Ty);
- Indices[1] = Context.getConstantInt(Type::Int32Ty, CounterNum);
+ Indices[1] = ConstantInt::get(Type::Int32Ty, CounterNum);
Constant *ElementPtr =
Context.getConstantExprGetElementPtr(CounterArray, &Indices[0],
Indices.size());
@@ -119,7 +119,7 @@ void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
// Load, increment and store the value back.
Value *OldVal = new LoadInst(ElementPtr, "OldFuncCounter", InsertPos);
Value *NewVal = BinaryOperator::Create(Instruction::Add, OldVal,
- Context.getConstantInt(Type::Int32Ty, 1),
+ ConstantInt::get(Type::Int32Ty, 1),
"NewFuncCounter", InsertPos);
new StoreInst(NewVal, ElementPtr, InsertPos);
}
OpenPOWER on IntegriCloud