diff options
author | Devang Patel <dpatel@apple.com> | 2011-06-24 20:48:14 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-06-24 20:48:14 +0000 |
commit | 0f03782d16002147608c14b34eb2a37f4881b532 (patch) | |
tree | 42ed3bdab03e2819767ad1142e3a2657f8117df2 /lib/VMCore/DebugInfoProbe.cpp | |
parent | 8594d429e02c688d428036f8563f09572da3fbff (diff) | |
download | llvm-0f03782d16002147608c14b34eb2a37f4881b532.tar.gz llvm-0f03782d16002147608c14b34eb2a37f4881b532.tar.bz2 llvm-0f03782d16002147608c14b34eb2a37f4881b532.tar.xz |
Revert unintentional check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/DebugInfoProbe.cpp')
-rw-r--r-- | lib/VMCore/DebugInfoProbe.cpp | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/lib/VMCore/DebugInfoProbe.cpp b/lib/VMCore/DebugInfoProbe.cpp index 382c297148..d1275ff58c 100644 --- a/lib/VMCore/DebugInfoProbe.cpp +++ b/lib/VMCore/DebugInfoProbe.cpp @@ -53,7 +53,6 @@ namespace llvm { Function *TheFn; std::set<MDNode *> DbgVariables; std::set<Instruction *> MissingDebugLoc; - std::set<unsigned> LineNos; }; } @@ -67,19 +66,14 @@ void DebugInfoProbeImpl::initialize(StringRef PName, Function &F) { DbgVariables.clear(); MissingDebugLoc.clear(); - LineNos.clear(); TheFn = &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) { - DebugLoc DL = BI->getDebugLoc(); - if (DL.isUnknown()) { - if (!isa<PHINode>(BI)) - MissingDebugLoc.insert(BI); - } else - LineNos.insert(DL.getLine()); - if (!isa<DbgInfoIntrinsic>(BI)) continue; + if (!isa<PHINode>(BI) && BI->getDebugLoc().isUnknown()) + MissingDebugLoc.insert(BI); + if (!isa<DbgInfoIntrinsic>(BI)) continue; Value *Addr = NULL; MDNode *Node = NULL; if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI)) { @@ -120,20 +114,16 @@ void DebugInfoProbeImpl::finalize(Function &F) { assert (TheFn == &F && "Invalid function to measure!"); std::set<MDNode *>DbgVariables2; - std::set<unsigned>LineNos2; for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI) for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI) { - DebugLoc DL = BI->getDebugLoc(); - if (DL.isUnknown()) { - if (!isa<PHINode>(BI) && MissingDebugLoc.count(BI) == 0) { - ++NumDbgLineLost; - DEBUG(dbgs() << "DebugInfoProbe (" << PassName << "): --- "); - DEBUG(BI->print(dbgs())); - DEBUG(dbgs() << "\n"); - } - } else - LineNos2.insert(DL.getLine()); + if (!isa<PHINode>(BI) && BI->getDebugLoc().isUnknown() && + MissingDebugLoc.count(BI) == 0) { + ++NumDbgLineLost; + DEBUG(dbgs() << "DebugInfoProbe (" << PassName << "): --- "); + DEBUG(BI->print(dbgs())); + DEBUG(dbgs() << "\n"); + } if (!isa<DbgInfoIntrinsic>(BI)) continue; Value *Addr = NULL; MDNode *Node = NULL; @@ -148,12 +138,6 @@ void DebugInfoProbeImpl::finalize(Function &F) { DbgVariables2.insert(Node); } - for (std::set<unsigned>::iterator I = LineNos.begin(), - E = LineNos.end(); I != E; ++I) { - unsigned LNO = *I; - if (LineNos2.count(LNO) == 0) - DEBUG(dbgs() << "DebugInfoProbe dropping line number " << LNO << "\n"); - } for (std::set<MDNode *>::iterator I = DbgVariables.begin(), E = DbgVariables.end(); I != E; ++I) { if (DbgVariables2.count(*I) == 0 && (*I)->getNumOperands() >= 2) { |