diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 00:44:37 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 00:44:37 +0000 |
commit | cb3fb5d4f5902d6759a27e04521a4a30b8fef7e7 (patch) | |
tree | f8e9717638771828ae21cd888a59c5aa40851604 /llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp | |
parent | e5914d8555e1bb04274a09db8e4c5a110255260e (diff) | |
download | bcm5719-llvm-cb3fb5d4f5902d6759a27e04521a4a30b8fef7e7.tar.gz bcm5719-llvm-cb3fb5d4f5902d6759a27e04521a4a30b8fef7e7.zip |
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
llvm-svn: 14953
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp index 3c22b4bf42e..1c0c4ada32f 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp @@ -42,8 +42,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, std::vector<Constant*> GEPIndices(2, Constant::getNullValue(Type::IntTy)); unsigned NumElements = 0; if (Array) { - ConstantPointerRef *ArrayCPR = ConstantPointerRef::get(Array); - Args[2] = ConstantExpr::getGetElementPtr(ArrayCPR, GEPIndices); + Args[2] = ConstantExpr::getGetElementPtr(Array, GEPIndices); NumElements = cast<ArrayType>(Array->getType()->getElementType())->getNumElements(); } else { @@ -87,7 +86,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, } void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum, - ConstantPointerRef *CounterArray) { + GlobalValue *CounterArray) { // Insert the increment after any alloca or PHI instructions... BasicBlock::iterator InsertPos = BB->begin(); while (isa<AllocaInst>(InsertPos) || isa<PHINode>(InsertPos)) |