Commit afcdf180 by phoon

set line of exception handling basic blocks to zero

parent 1a758e17
......@@ -13,6 +13,7 @@ struct VisBasicBlock {
VisBasicBlock(BasicBlock &BB, unsigned Function)
: Line(-1u), LineEnd(0), Function(Function) {
if (BB.begin()->getOpcode() != Instruction::LandingPad) {
for (auto &Inst : BB) {
if (auto Loc = Inst.getDebugLoc()) {
if (Loc.getLine() == 0)
......@@ -28,6 +29,7 @@ struct VisBasicBlock {
LineEnd = std::max(LineEnd, theLoc->getLine());
}
}
}
// Restore to 0 when debug info is not available
if (Line == -1u)
Line = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment