From 43247f05421ba6e6f247592be6c2f39778796c6e Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Thu, 9 Nov 2017 02:33:43 +0000 Subject: [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 --- llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp') 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 @@ LineCoverageStats::LineCoverageStats( 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); -- cgit v1.1