[PATCH] D85036: [llvm-cov] reset executation count to 0 after wrapped segment
Zequan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 10:25:27 PDT 2020
zequanwu created this revision.
zequanwu added a reviewer: vsk.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
zequanwu requested review of this revision.
Fix the bug: https://bugs.llvm.org/show_bug.cgi?id=36979. It also fixes this bug: https://bugs.llvm.org/show_bug.cgi?id=35404, which I think is caused by the same problem.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85036
Files:
llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
Index: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
===================================================================
--- llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -770,6 +770,7 @@
ExecutionCount = WrappedSegment->Count;
if (!MinRegionCount)
return;
+ ExecutionCount = 0;
for (const auto *LS : LineSegments)
if (isStartOfRegion(LS))
ExecutionCount = std::max(ExecutionCount, LS->Count);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85036.282258.patch
Type: text/x-patch
Size: 488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200731/ec5e9b19/attachment.bin>
More information about the llvm-commits
mailing list