aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 22:17:13 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 22:17:13 +0000
commitdebcb01b0f0a15f568ca69e8f288fade4bfc7297 (patch)
tree22a274838cf6c55205a8a3f0a80262b09b63b069 /lib/Transforms/Instrumentation
parent37c4a2d6f15ff32c9ae91e333d655a349e195993 (diff)
downloadexternal_llvm-debcb01b0f0a15f568ca69e8f288fade4bfc7297.zip
external_llvm-debcb01b0f0a15f568ca69e8f288fade4bfc7297.tar.gz
external_llvm-debcb01b0f0a15f568ca69e8f288fade4bfc7297.tar.bz2
Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/BlockProfiling.cpp4
-rw-r--r--lib/Transforms/Instrumentation/EdgeProfiling.cpp2
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp
index 065bd11..700260d 100644
--- a/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp
@@ -63,7 +63,7 @@ bool FunctionProfiler::runOnModule(Module &M) {
if (!I->isDeclaration())
++NumFunctions;
- const Type *ATy = M.getContext().getArrayType(Type::Int32Ty, NumFunctions);
+ const Type *ATy = ArrayType::get(Type::Int32Ty, NumFunctions);
GlobalVariable *Counters =
new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage,
M.getContext().getNullValue(ATy), "FuncProfCounters");
@@ -108,7 +108,7 @@ bool BlockProfiler::runOnModule(Module &M) {
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
NumBlocks += I->size();
- const Type *ATy = M.getContext().getArrayType(Type::Int32Ty, NumBlocks);
+ const Type *ATy = ArrayType::get(Type::Int32Ty, NumBlocks);
GlobalVariable *Counters =
new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage,
M.getContext().getNullValue(ATy), "BlockProfCounters");
diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index d1aa370..b900945 100644
--- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
@@ -64,7 +64,7 @@ bool EdgeProfiler::runOnModule(Module &M) {
NumEdges += BB->getTerminator()->getNumSuccessors();
}
- const Type *ATy = M.getContext().getArrayType(Type::Int32Ty, NumEdges);
+ const Type *ATy = ArrayType::get(Type::Int32Ty, NumEdges);
GlobalVariable *Counters =
new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage,
M.getContext().getNullValue(ATy), "EdgeProfCounters");
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index 70ce86a..d5752b7 100644
--- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
@@ -25,8 +25,8 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
GlobalValue *Array) {
LLVMContext &Context = MainFn->getContext();
const Type *ArgVTy =
- Context.getPointerTypeUnqual(Context.getPointerTypeUnqual(Type::Int8Ty));
- const PointerType *UIntPtr = Context.getPointerTypeUnqual(Type::Int32Ty);
+ PointerType::getUnqual(PointerType::getUnqual(Type::Int8Ty));
+ const PointerType *UIntPtr = PointerType::getUnqual(Type::Int32Ty);
Module &M = *MainFn->getParent();
Constant *InitFn = M.getOrInsertFunction(FnName, Type::Int32Ty, Type::Int32Ty,
ArgVTy, UIntPtr, Type::Int32Ty,