[Coverage] Use the wrapped segment when a line has entry segments
We've worked around bugs in the frontend by ignoring the count from
wrapped segments when a line has at least one region entry segment.
Those frontend bugs are now fixed, so it's time to regenerate the
checked-in covmapping files and remove the workaround.
llvm-svn: 317761
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
index ce93229..6cde386 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -698,12 +698,12 @@
if (!Mapped)
return;
- // Pick the max count from the non-gap, region entry segments. If there
- // aren't any, use the wrapped count.
- if (!MinRegionCount) {
+ // Pick the max count from the non-gap, region entry segments and the
+ // wrapped count.
+ if (WrappedSegment)
ExecutionCount = WrappedSegment->Count;
+ if (!MinRegionCount)
return;
- }
for (const auto *LS : LineSegments)
if (isStartOfRegion(LS))
ExecutionCount = std::max(ExecutionCount, LS->Count);