From 13ba23bb79ce689f29d67e8656a599f019e9bb03 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 19 Sep 2014 08:13:16 +0000 Subject: [PATCH] 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. llvm-svn: 218109 --- .../Inputs/lineExecutionCounts.covmapping | Bin 194 -> 162 bytes .../tools/llvm-cov/showLineExecutionCounts.cpp | 7 ++++++- llvm/tools/llvm-cov/SourceCoverageView.cpp | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping b/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping index 5cfa1694da2567aa1568df3db4c3a63fed0b0519..9774b89ede8c3f9010797390894a80bd112f27e0 100644 GIT binary patch delta 85 zcmX@axQNjsC#NhoIlnBoB(=CCC9x!t<-oy)27%nf%sfU01_mV{wgX}iIH17501{&X bVvv}xvj&g^iYe%qnG-ES WEy>K!bIvc#E14KC#K=6c$N&Iu*CLine : 0; const CoverageSegment *WrappedSegment = nullptr; SmallVector 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; }