llvm-project/llvm/lib/ProfileData/Coverage
Vedant Kumar ad8f637bd8 [Coverage] Use gap regions to select better line exec counts
After clang started emitting deferred regions (r312818), llvm-cov has
had a hard time picking reasonable line execuction counts. There have
been one or two generic improvements in this area (e.g r310012), but
line counts can still report coverage for whitespace instead of code
(llvm.org/PR34612).

To fix the problem:

 * Introduce a new region kind so that frontends can explicitly label
   gap areas.

   This is done by changing the encoding of the columnEnd field of
   MappingRegion. This doesn't substantially increase binary size, and
   makes it easy to maintain backwards-compatibility.

 * Don't set the line count to a count from a gap area, unless the count
   comes from a wrapped segment.

 * Don't highlight gap areas as uncovered.

Fixes llvm.org/PR34612.

llvm-svn: 313597
2017-09-18 23:37:28 +00:00
..
CMakeLists.txt
CoverageMapping.cpp [Coverage] Use gap regions to select better line exec counts 2017-09-18 23:37:28 +00:00
CoverageMappingReader.cpp [Coverage] Use gap regions to select better line exec counts 2017-09-18 23:37:28 +00:00
CoverageMappingWriter.cpp [Coverage] Use gap regions to select better line exec counts 2017-09-18 23:37:28 +00:00
LLVMBuild.txt