From 016111f7b98ef31f22a0ec95d7d0b0237b5f2176 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Mon, 19 Sep 2016 00:38:23 +0000 Subject: [llvm-cov] Track function and instantiation coverage separately These are distinct statistics which are useful to look at separately. Example: say you have a template function "foo" with 5 instantiations and only 3 of them are covered. Then this contributes (1/1) to the total function coverage and (3/5) to the total instantiation coverage. I.e, the old "Function Coverage" column has been renamed to "Instantiation Coverage", and the new "Function Coverage" aggregates information from the various instantiations of a function. One benefit of making this switch is that the Line and Region coverage columns will start making sense. Let's continue the example and assume that the 5 instantiations of "foo" cover {2, 4, 6, 8, 10} out of 10 lines respectively. The new line coverage for "foo" is (10/10), not (30/50). The old scenario got confusing because we'd report that there were more lines in a file than what was actually possible. llvm-svn: 281875 --- llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp') diff --git a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp index fcaedcd0d39..501eb0db6ea 100644 --- a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp +++ b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp @@ -80,11 +80,14 @@ int main() { // TEXT: [[@LINE]]| 161|int main( // HTML-INDEX-LABEL: // HTML-INDEX: // HTML-INDEX: +// HTML-INDEX: // HTML-INDEX: // HTML-INDEX: // HTML-INDEX: // HTML-INDEX:
FilenameFunction CoverageInstantiation CoverageLine CoverageRegion Coverage // HTML-INDEX: 100.00% (1/1) +// HTML-INDEX: +// HTML-INDEX: 100.00% (1/1) // HTML-INDEX: // HTML-INDEX: 80.00% (16/20) // HTML-INDEX: -- cgit v1.2.3