I'm trying to call llvm-cov gcov -b "$@"
but getting the error: "llvm-cov gcov: for the -b option: may only occur zero or one times!" and cannot find any explanation for it... Does anybody know what it means?
context: an attempt to get code coverage with initial coverage on Ubuntu 20.04.
Having llvm-gcov.sh:
#!/bin/bash
exec llvm-cov gcov --branch-probabilities --branch-counts --unconditional-branches --all-blocks --function-summaries "$@"
In cmake file did: set(TOOLCHAIN_FLAGS_DEBUG "-g -fstandalone-debug -O0 --coverage")
Do build.
Call: lcov --initial --directory .. --gcov-tool "${REPORT_DIR}/llvm-gcov.sh" --capture -o base.info
. Getting "llvm-cov gcov: for the -b option: may only occur zero or one times!". Without 'branch' options it works fine.
Run app.
Call: lcov --directory .. --gcov-tool "${REPORT_DIR}/llvm-gcov.sh" --capture -o app.info
. Getting the same error.
Call: lcov -a base.info -a app.info -o total.info
Call: genhtml total.info -o out_report