llvm-cov and "unknown command line argument: -format=html"

893 Views Asked by At

I did a code coverage test using the llvm utility. After that, I needed to do a html cover file. I used the command

llvm-cov show test -instr-profile=default.profdata -format=html > report.html

Then I received the following error:

Unknown command line argument '-format=html'.

How I can solve my problem ?

1

There are 1 best solutions below

0
Barmar On

According to the documentation the syntax is

llvm-cov show [options] -instr-profile PROFILE BIN [-object BIN,…] [[-object BIN]] [SOURCES]

so the option -format=html needs to go before the profile and binary name.

llvm-cov show -format=html -instr-profile default.profdata test > report.html