llvm-project/llvm/test/tools/llvm-cov
Vedant Kumar 846b985a92 [llvm-cov] Ignore unclosed line segments when setting line counts
This patch makes a slight change to the way llvm-cov determines line
execution counts. If there are multiple line segments on a line, the
line count is the max count among the regions which start *and* end on
the line. This avoids an issue posed by deferred regions which start on
the same line as a terminated region, e.g:

  if (false)
    return; //< The line count should be 0, even though a new region
            //< starts at the semi-colon.
  foo();

Another change is that counts from line segments which don't correspond
to region entries are considered. This enables the first change, and
corrects an outstanding issue (see the showLineExecutionCounts.cpp test
change).

This is related to D35925.

Testing: check-profile, llvm-cov lit tests

Differential Revision: https://reviews.llvm.org/D36014

llvm-svn: 310012
2017-08-04 00:36:24 +00:00
..
Inputs [llvm-cov] Ignore unclosed line segments when setting line counts 2017-08-04 00:36:24 +00:00
binary-formats.c
combine_expansions.cpp
copy_block_helper.m
cov-comdat.test
deferred-region.cpp [llvm-cov] Ignore unclosed line segments when setting line counts 2017-08-04 00:36:24 +00:00
demangle.test [llvm-cov] Don't show function summaries when filtering by filename (fixes PR31395) 2017-02-05 20:11:08 +00:00
double_dots.c
gcov47_compatibility.cpp
hideUnexecutedSubviews.test
lit.local.cfg
llvm-cov.test
load-multiple-objects.test
multiple-files.test [llvm-cov] Strip redundant path components from filenames (fix PR31982) 2017-02-23 22:20:32 +00:00
native_separators.c
prefer_used_to_unused.h
prevent_false_instantiations.h
range_based_for.cpp
report.cpp [llvm-cov] Don't show function summaries when filtering by filename (fixes PR31395) 2017-02-05 20:11:08 +00:00
scan-directory.test
showExpansions.cpp
showHighlightedRanges.cpp
showLineExecutionCounts.cpp [llvm-cov] Ignore unclosed line segments when setting line counts 2017-08-04 00:36:24 +00:00
showProjectSummary.cpp
showRegionMarkers.cpp
showTabsHTML.cpp [llvm] Remove redundant check-prefix=CHECK from tests. NFC. 2017-07-17 17:32:45 +00:00
showTemplateInstantiations.cpp [llvm-cov] Respect the value of the -show-instantiations option 2017-08-02 23:35:24 +00:00
style.test
threads.c [llvm-cov] Add a cl::opt to control the number of threads 2017-07-11 01:23:29 +00:00
universal-binary.c [llvm-cov] Allow specifying distinct architectures for each loaded binary 2017-08-01 21:23:26 +00:00
warnings.h [llvm-cov] Error-out when an unsupported format is used (PR32087) 2017-02-28 16:57:28 +00:00
zeroFunctionFile.c [llvm-cov] Disable threading in a test. NFC. 2017-07-11 01:42:12 +00:00