[llvm-commits] [llvm] r130542 - /llvm/trunk/lib/VMCore/DebugInfoProbe.cpp
Devang Patel
dpatel at apple.com
Fri Apr 29 14:36:04 PDT 2011
Author: dpatel
Date: Fri Apr 29 16:36:04 2011
New Revision: 130542
URL: http://llvm.org/viewvc/llvm-project?rev=130542&view=rev
Log:
Print new instructions without DebugLoc.
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=130542&r1=130541&r2=130542&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/DebugInfoProbe.cpp (original)
+++ llvm/trunk/lib/VMCore/DebugInfoProbe.cpp Fri Apr 29 16:36:04 2011
@@ -53,6 +53,7 @@
Function *TheFn;
std::set<unsigned> LineNos;
std::set<MDNode *> DbgVariables;
+ std::set<Instruction *> MissingDebugLoc;
};
}
@@ -89,6 +90,8 @@
for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI)
for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
BI != BE; ++BI) {
+ if (BI->getDebugLoc().isUnknown())
+ MissingDebugLoc.insert(BI);
if (!isa<DbgInfoIntrinsic>(BI)) continue;
Value *Addr = NULL;
MDNode *Node = NULL;
@@ -148,6 +151,12 @@
for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI)
for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
BI != BE; ++BI) {
+ if (BI->getDebugLoc().isUnknown() &&
+ MissingDebugLoc.count(BI) == 0) {
+ DEBUG(dbgs() << "DebugInfoProbe(" << PassName << "): --- ");
+ DEBUG(BI->print(dbgs()));
+ DEBUG(dbgs() << "\n");
+ }
if (!isa<DbgInfoIntrinsic>(BI)) continue;
Value *Addr = NULL;
MDNode *Node = NULL;
More information about the llvm-commits
mailing list