aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/CoverageMappingTest.cpp
diff options
context:
space:
mode:
authorZequan Wu <zequanwu@google.com>2020-07-30 23:36:31 -0700
committerZequan Wu <zequanwu@google.com>2020-08-04 18:38:44 -0700
commite3df9471750935876bd2bf7da93ccf0eacca8592 (patch)
tree395f7e37fbb441ede84d91a9bf40c30c257778a6 /llvm/unittests/ProfileData/CoverageMappingTest.cpp
parentfe74f731e7024ce8b66869777dca6d6ed5a22e47 (diff)
downloadllvm-e3df9471750935876bd2bf7da93ccf0eacca8592.zip
llvm-e3df9471750935876bd2bf7da93ccf0eacca8592.tar.gz
llvm-e3df9471750935876bd2bf7da93ccf0eacca8592.tar.bz2
[llvm-cov] reset executation count to 0 after wrapped segment
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. Differential Revision: https://reviews.llvm.org/D85036
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/CoverageMappingTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/ProfileData/CoverageMappingTest.cpp b/llvm/unittests/ProfileData/CoverageMappingTest.cpp
index 4854b7f..43386d2 100644
--- a/llvm/unittests/ProfileData/CoverageMappingTest.cpp
+++ b/llvm/unittests/ProfileData/CoverageMappingTest.cpp
@@ -675,7 +675,7 @@ TEST_P(CoverageMappingTest, test_line_coverage_iterator) {
CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
unsigned Line = 0;
- unsigned LineCounts[] = {20, 20, 20, 20, 30, 10, 10, 10, 10, 0, 0};
+ unsigned LineCounts[] = {20, 20, 20, 20, 10, 10, 10, 10, 10, 0, 0};
for (const auto &LCS : getLineCoverageStats(Data)) {
ASSERT_EQ(Line + 1, LCS.getLine());
errs() << "Line: " << Line + 1 << ", count = " << LCS.getExecutionCount() << "\n";