bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage

llvm-svn: 14953
diff --git a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index ef334f2..c584ca5 100644
--- a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
@@ -60,8 +60,6 @@
     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 @@
           // 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);
           }
         }
       }