mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
Print breakpoints for call instructions. This is used by optimized debug info test harness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
98bec51b35
commit
29012319cd
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user