diff options
author | Devang Patel <dpatel@apple.com> | 2011-04-29 21:36:04 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-04-29 21:36:04 +0000 |
commit | 84d7eb7252132c5962d1223dc882e44bf9ca47f4 (patch) | |
tree | ab50ee3d7fed0f1371b6456acd05bea825b1783c /llvm/lib | |
parent | 491da68ef9feec71a75feab4b4f092680309f300 (diff) | |
download | bcm5719-llvm-84d7eb7252132c5962d1223dc882e44bf9ca47f4.tar.gz bcm5719-llvm-84d7eb7252132c5962d1223dc882e44bf9ca47f4.zip |
Print new instructions without DebugLoc.
llvm-svn: 130542
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/DebugInfoProbe.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/DebugInfoProbe.cpp b/llvm/lib/VMCore/DebugInfoProbe.cpp index d417e4bc358..334c3d815d6 100644 --- a/llvm/lib/VMCore/DebugInfoProbe.cpp +++ b/llvm/lib/VMCore/DebugInfoProbe.cpp @@ -53,6 +53,7 @@ namespace llvm { Function *TheFn; std::set<unsigned> LineNos; std::set<MDNode *> DbgVariables; + std::set<Instruction *> MissingDebugLoc; }; } @@ -89,6 +90,8 @@ void DebugInfoProbeImpl::initialize(StringRef PName, Function &F) { 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 @@ void DebugInfoProbeImpl::finalize(Function &F) { 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; |