diff options
author | Devang Patel <dpatel@apple.com> | 2011-04-28 20:46:18 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-04-28 20:46:18 +0000 |
commit | 77562c74e5709ea6bb5756074fa4f450171a25a0 (patch) | |
tree | 78cef6a9cc56a7d1991854482742468cd2977f8b | |
parent | 5d86759e0ff44e07ead4982673fe10abec50f765 (diff) |
Beautify debug info probe output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130435 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/DebugInfoProbe.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/VMCore/DebugInfoProbe.cpp b/lib/VMCore/DebugInfoProbe.cpp index 408153f34e..43eda47dbe 100644 --- a/lib/VMCore/DebugInfoProbe.cpp +++ b/lib/VMCore/DebugInfoProbe.cpp @@ -136,7 +136,9 @@ void DebugInfoProbeImpl::finalize(Function &F) { unsigned LineNo = *I; if (LineNos2.count(LineNo) == 0) { DEBUG(dbgs() - << "DebugInfoProbe: Losing dbg info for source line " + << "DebugInfoProbe(" + << PassName + << "): Losing dbg info for source line " << LineNo << "\n"); ++NumDbgLineLost; } @@ -162,9 +164,16 @@ 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() << "DebugInfoProbe: Losing dbg info for variable: "); - DEBUG((*I)->print(dbgs())); + if (DbgVariables2.count(*I) == 0 && (*I)->getNumOperands() >= 2) { + DEBUG(dbgs() + << "DebugInfoProbe(" + << PassName + << "): Losing dbg info for variable: "); + if (MDString *MDS = dyn_cast_or_null<MDString>((*I)->getOperand(2))) + DEBUG(dbgs() << MDS->getString()); + else + DEBUG(dbgs() << "..."); + DEBUG(dbgs() << "\n"); ++NumDbgValueLost; } } |