From ed4edf9e5f42b12c9b01c7962a1ff7f86e5d9750 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 16 Mar 2011 00:27:57 +0000 Subject: [PATCH] Do not accidently initialize NumDbgValueLost and NumDbgLineLost counts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127720 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/DebugInfoProbe.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/VMCore/DebugInfoProbe.cpp b/lib/VMCore/DebugInfoProbe.cpp index 4a5e659ef27..08ec5ba4373 100644 --- a/lib/VMCore/DebugInfoProbe.cpp +++ b/lib/VMCore/DebugInfoProbe.cpp @@ -80,8 +80,6 @@ static void collect(Function &F, std::set &Lines) { void DebugInfoProbeImpl::initialize(StringRef PName, Function &F) { if (!EnableDebugInfoProbe) return; PassName = PName; - NumDbgLineLost = 0; - NumDbgValueLost = 0; LineNos.clear(); DbgVariables.clear(); @@ -121,6 +119,8 @@ void DebugInfoProbeImpl::report() { << PassName << "\n"; delete OutStream; } + NumDbgLineLost = 0; + NumDbgValueLost = 0; } /// finalize - Collect information after running an optimization pass. This @@ -135,7 +135,7 @@ void DebugInfoProbeImpl::finalize(Function &F) { 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 @@ void DebugInfoProbeImpl::finalize(Function &F) { for (std::set::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; }