OSDN Git Service

[llvm-cov] Move LineCoverageIterator to libCoverage. NFC.
authorVedant Kumar <vsk@apple.com>
Wed, 18 Oct 2017 23:58:28 +0000 (23:58 +0000)
committerVedant Kumar <vsk@apple.com>
Wed, 18 Oct 2017 23:58:28 +0000 (23:58 +0000)
commit2ce33a5dffc95368fb7d6faa5e6f4b9b5471c3b9
treeaa81d0acdac08bbc5f80bc1245cea4ecca0d32a0
parent34ea0deeb123fc72aabf286a7b9743679d3d58c1
[llvm-cov] Move LineCoverageIterator to libCoverage. NFC.

LineCoverageIterator makes it easy for clients of coverage data to
determine line execution counts for a file or function. The coverage
iteration logic is tricky enough that it really pays not to have
multiple copies of it. Hopefully having just one implementation in LLVM
will make the iteration logic easier to test, reuse, and update.

This commit is NFC but I've added a unit test to go along with it just
because it's easy to do now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316141 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/Coverage/CoverageMapping.h
lib/ProfileData/Coverage/CoverageMapping.cpp
tools/llvm-cov/CoverageSummaryInfo.cpp
tools/llvm-cov/CoverageSummaryInfo.h
unittests/ProfileData/CoverageMappingTest.cpp