1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Print breakpoints for call instructions. This is used by optimized debug info test harness.

llvm-svn: 121432
This commit is contained in:
Devang Patel 2010-12-09 23:37:07 +00:00
parent dd76dce2d8
commit a8fa89a39c

View File

@ -364,6 +364,19 @@ struct BreakpointPrinter : public FunctionPass {
} while (BI != I->begin());
break;
}
BasicBlock &EntryBB = F.getEntryBlock();
for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) {
BasicBlock *BB = I;
if (BB == &EntryBB) continue;
for (BasicBlock::iterator BI = I->begin(), BE = I->end(); BI != BE; ++BI)
if (CallInst *CI = dyn_cast<CallInst>(BI)) {
const DebugLoc DL = CI->getDebugLoc();
if (!DL.isUnknown()) {
DIScope S(DL.getScope(getGlobalContext()));
Out << S.getFilename() << " " << DL.getLine() << "\n";
}
}
}
return false;
}