From 42b96889d1bace109cc1d09e06afacc3387a9e31 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218109 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../Inputs/lineExecutionCounts.covmapping | Bin 194 -> 162 bytes test/tools/llvm-cov/showLineExecutionCounts.cpp | 7 ++++++- tools/llvm-cov/SourceCoverageView.cpp | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping b/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; }