aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/SourceCoverageView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.cpp')
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageView.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp
index 3806ee9..08a1c75 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageView.cpp
@@ -95,9 +95,15 @@ LineCoverageStats::LineCoverageStats(
if (isStartOfRegion(LineSegments[I]))
++MinRegionCount;
+ bool StartOfSkippedRegion = !LineSegments.empty() &&
+ !LineSegments.front()->HasCount &&
+ LineSegments.front()->IsRegionEntry;
+
ExecutionCount = 0;
HasMultipleRegions = MinRegionCount > 1;
- Mapped = (WrappedSegment && WrappedSegment->HasCount) || (MinRegionCount > 0);
+ Mapped =
+ !StartOfSkippedRegion &&
+ ((WrappedSegment && WrappedSegment->HasCount) || (MinRegionCount > 0));
if (!Mapped)
return;