linux-test-project / lcov

LCOV
GNU General Public License v2.0
867 stars 235 forks source link

does 'llvm-cov export format=lcov' support branch coverage? #206

Closed henry2cox closed 10 months ago

henry2cox commented 1 year ago

I am using llvm-cov export -instr-profile=exe.profdata exe > exe.info to turn llvm-collected profile data to lcov format. The result contains file and line coverpoints - but not branches. Some other llvm-cov commands appear to support -b and/or -c (branch probabilities and branch counts, respectively) - but the 'export' command does not appear to do so.

The other option is to ask llvm to generate gcov-format data (which works) - but I would prefer not to do that for this particular application.

This may be pilot error. Guidance is appreciated.

Thanks Henry

henry2cox commented 10 months ago

Closing my issue - see #234 . The upshot: yes, llvm-cov does support branch data - starting in llvm/12, bug fix in llvm/13. Any recent LLVM release should be fine.