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 | d36bdb5208dc7a9d7eab8e210606d459976d7fb3 (patch) | |
tree | 0addcd99a63212f85f0045f521257c8f59d37f37 | |
parent | 8d58790019afbebfa7d84a820a5661a55fe73e62 (diff) | |
download | bcm5719-llvm-d36bdb5208dc7a9d7eab8e210606d459976d7fb3.tar.gz bcm5719-llvm-d36bdb5208dc7a9d7eab8e210606d459976d7fb3.zip |
Beautify debug info probe output.
llvm-svn: 130435
-rw-r--r-- | llvm/lib/VMCore/DebugInfoProbe.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/DebugInfoProbe.cpp b/llvm/lib/VMCore/DebugInfoProbe.cpp index 408153f34eb..43eda47dbe1 100644 --- a/llvm/lib/VMCore/DebugInfoProbe.cpp +++ b/llvm/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; } } |