diff options
author | Vedant Kumar <vsk@apple.com> | 2017-11-09 02:33:43 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-11-09 02:33:43 +0000 |
commit | 43247f05421ba6e6f247592be6c2f39778796c6e (patch) | |
tree | 7a1043fdaf2a1e6c1bb7d6b9546a068d8dd6895d /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | |
parent | f9a0d44eea28ada1adf75e5e63274055fccd65ab (diff) | |
download | llvm-43247f05421ba6e6f247592be6c2f39778796c6e.zip llvm-43247f05421ba6e6f247592be6c2f39778796c6e.tar.gz llvm-43247f05421ba6e6f247592be6c2f39778796c6e.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
-rw-r--r-- | llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); |