diff options
author | Devang Patel <dpatel@apple.com> | 2011-03-16 00:27:57 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-03-16 00:27:57 +0000 |
commit | ed4edf9e5f42b12c9b01c7962a1ff7f86e5d9750 (patch) | |
tree | e7d6582cf138eb412b0d362ca422f5903113406c /lib/VMCore/DebugInfoProbe.cpp | |
parent | 85b0f468cf8390fca3ec356cd498ce0039dbad4f (diff) | |
download | llvm-ed4edf9e5f42b12c9b01c7962a1ff7f86e5d9750.tar.gz llvm-ed4edf9e5f42b12c9b01c7962a1ff7f86e5d9750.tar.bz2 llvm-ed4edf9e5f42b12c9b01c7962a1ff7f86e5d9750.tar.xz |
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
Diffstat (limited to 'lib/VMCore/DebugInfoProbe.cpp')
-rw-r--r-- | lib/VMCore/DebugInfoProbe.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VMCore/DebugInfoProbe.cpp b/lib/VMCore/DebugInfoProbe.cpp index 4a5e659ef2..08ec5ba437 100644 --- a/lib/VMCore/DebugInfoProbe.cpp +++ b/lib/VMCore/DebugInfoProbe.cpp @@ -80,8 +80,6 @@ static void collect(Function &F, std::set<unsigned> &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<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; } |