[llvm-commits] [llvm] r130435 - /llvm/trunk/lib/VMCore/DebugInfoProbe.cpp
Devang Patel
dpatel at apple.com
Thu Apr 28 13:46:18 PDT 2011
Author: dpatel
Date: Thu Apr 28 15:46:18 2011
New Revision: 130435
URL: http://llvm.org/viewvc/llvm-project?rev=130435&view=rev
Log:
Beautify debug info probe output.
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=130435&r1=130434&r2=130435&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/DebugInfoProbe.cpp (original)
+++ llvm/trunk/lib/VMCore/DebugInfoProbe.cpp Thu Apr 28 15:46:18 2011
@@ -136,7 +136,9 @@
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 @@
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;
}
}
More information about the llvm-commits
mailing list