[llvm-commits] [llvm] r127720 - /llvm/trunk/lib/VMCore/DebugInfoProbe.cpp

Devang Patel dpatel at apple.com
Tue Mar 15 17:27:57 PDT 2011


Author: dpatel
Date: Tue Mar 15 19:27:57 2011
New Revision: 127720

URL: http://llvm.org/viewvc/llvm-project?rev=127720&view=rev
Log:
Do not accidently initialize NumDbgValueLost and NumDbgLineLost counts.

Modified:
    llvm/trunk/lib/VMCore/DebugInfoProbe.cpp

Modified: llvm/trunk/lib/VMCore/DebugInfoProbe.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DebugInfoProbe.cpp?rev=127720&r1=127719&r2=127720&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/DebugInfoProbe.cpp (original)
+++ llvm/trunk/lib/VMCore/DebugInfoProbe.cpp Tue Mar 15 19:27:57 2011
@@ -80,8 +80,6 @@
 void DebugInfoProbeImpl::initialize(StringRef PName, Function &F) {
   if (!EnableDebugInfoProbe) return;
   PassName = PName;
-  NumDbgLineLost = 0;
-  NumDbgValueLost = 0;
 
   LineNos.clear();
   DbgVariables.clear();
@@ -121,6 +119,8 @@
                  << PassName << "\n";
     delete OutStream;
   }
+  NumDbgLineLost = 0;
+  NumDbgValueLost = 0;
 }
 
 /// finalize - Collect information after running an optimization pass. This
@@ -135,7 +135,7 @@
          E = LineNos.end(); I != E; ++I) {
     unsigned LineNo = *I;
     if (LineNos2.count(LineNo) == 0) {
-      DEBUG(dbgs() << "Losing dbg info intrinsic at line " << LineNo << " ");
+      DEBUG(dbgs() << "DebugInfoProbe: Losing dbg info intrinsic at line " << LineNo << "\n");
       ++NumDbgLineLost;
     }
   }
@@ -161,7 +161,7 @@
   for (std::set<MDNode *>::iterator I = DbgVariables.begin(), 
          E = DbgVariables.end(); I != E; ++I) {
     if (DbgVariables2.count(*I) == 0) {
-      DEBUG(dbgs() << "Losing dbg info for variable: ");
+      DEBUG(dbgs() << "DebugInfoProbe: Losing dbg info for variable: ");
       DEBUG((*I)->print(dbgs()));
       ++NumDbgValueLost;
     }





More information about the llvm-commits mailing list