[llvm-bugs] [Bug 31980] New: llvm-cov show -format html: index says 0/0 lines covered for a source file with some non-0 line counts

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 16 07:54:48 PST 2017


http://bugs.llvm.org/show_bug.cgi?id=31980

            Bug ID: 31980
           Summary: llvm-cov show -format html: index says 0/0 lines
                    covered for a source file with some non-0 line counts
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: opt
          Assignee: unassignedbugs at nondot.org
          Reporter: jay.foad at gmail.com
                CC: llvm-bugs at lists.llvm.org

To reproduce:

$ cat cov.c
#include <stdio.h>
int main() {
#include "cov.h"
}
$ cat cov.h
int i;
for (i = 0; i < 10; i++)
        printf("hello\n");
$ clang -fprofile-instr-generate -fcoverage-mapping -o cov cov.c
$ ./cov
hello
hello
hello
hello
hello
hello
hello
hello
hello
hello
$ llvm-profdata merge default.profraw -o merged.profdata
$ llvm-cov show -instr-profile merged.profdata cov -format html -output-dir out

Now out/.../cov.h.html shows line coverage counts of 1, 11 and 10. But
out/index.html says the line coverage for cov.h is "- (0/0)"!

I'm using llvm and clang built from svn r295326.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170216/7bee21b9/attachment.html>


More information about the llvm-bugs mailing list