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 | 518310cb0d136906ff0a99d7a24cb460794de5bf (patch) | |
tree | d8ad6b32edf261c90ce2c190f4c74dc3d044502f /lib/Transforms/Instrumentation/ProfilingUtils.cpp | |
parent | 593eb952281138e1877adbfb11b88b6e32fdd732 (diff) |
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilingUtils.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/ProfilingUtils.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp index 3c22b4bf42..1c0c4ada32 100644 --- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp +++ b/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)) |