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/EdgeProfiling.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/EdgeProfiling.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/EdgeProfiling.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp index ef334f22f3..c584ca5dfe 100644 --- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -60,8 +60,6 @@ bool EdgeProfiler::run(Module &M) { new GlobalVariable(ATy, false, GlobalValue::InternalLinkage, Constant::getNullValue(ATy), "EdgeProfCounters", &M); - ConstantPointerRef *CounterCPR = ConstantPointerRef::get(Counters); - // Instrument all of the edges... unsigned i = 0; for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) @@ -80,10 +78,10 @@ bool EdgeProfiler::run(Module &M) { // otherwise insert it in the successor block. if (TI->getNumSuccessors() == 0) { // Insert counter at the start of the block - IncrementCounterInBlock(BB, i++, CounterCPR); + IncrementCounterInBlock(BB, i++, Counters); } else { // Insert counter at the start of the block - IncrementCounterInBlock(TI->getSuccessor(s), i++, CounterCPR); + IncrementCounterInBlock(TI->getSuccessor(s), i++, Counters); } } } |