mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
llvm-cov: Fix dropped lines when filters were applied
Uncovered lines in the middle of a covered region weren't being shown when filtering to a particular function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218109 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -163,6 +163,7 @@ void SourceCoverageView::render(raw_ostream &OS, bool WholeFile,
|
||||
auto NextSegment = CoverageSegments.begin();
|
||||
auto EndSegment = CoverageSegments.end();
|
||||
|
||||
unsigned FirstLine = NextSegment != EndSegment ? NextSegment->Line : 0;
|
||||
const CoverageSegment *WrappedSegment = nullptr;
|
||||
SmallVector<const CoverageSegment *, 8> LineSegments;
|
||||
for (line_iterator LI(File, /*SkipBlanks=*/false); !LI.is_at_eof(); ++LI) {
|
||||
@ -171,7 +172,7 @@ void SourceCoverageView::render(raw_ostream &OS, bool WholeFile,
|
||||
if (!WholeFile) {
|
||||
if (NextSegment == EndSegment)
|
||||
break;
|
||||
else if (LI.line_number() < NextSegment->Line)
|
||||
else if (LI.line_number() < FirstLine)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user