Commit aa1ad63c by phoon

check if the line of inline code is zero

parent afcdf180
......@@ -16,8 +16,6 @@ struct VisBasicBlock {
if (BB.begin()->getOpcode() != Instruction::LandingPad) {
for (auto &Inst : BB) {
if (auto Loc = Inst.getDebugLoc()) {
if (Loc.getLine() == 0)
continue;
auto theLoc = Loc.get();
if (auto loc_tmp = theLoc->getInlinedAt()) {
while (loc_tmp->getInlinedAt()) {
......@@ -25,6 +23,8 @@ struct VisBasicBlock {
}
theLoc = loc_tmp;
}
if (theLoc->getLine() == 0)
continue;
Line = std::min(Line, theLoc->getLine());
LineEnd = std::max(LineEnd, theLoc->getLine());
}
......
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