LLVM llvm-cov
llvm.org
- Free plan
- Windows
- macOS
- Linux
What LLVM llvm-cov is
LLVM llvm-cov reports code coverage for programs built to produce profile data. It supports gcov-style coverage and Clang instrumentation-based profiling, with coverage types that include function, instantiation, line, region, branch, and MC/DC. Its commands include gcov, show, report, and export. Use show for line-by-line coverage, optionally limited to specified source files; report can present summaries with branch, function, and MC/DC statistics. Output options include text, HTML, JSON, and LCOV. JSON exports can include regions, functions, branches, expansions, and summaries. Inputs may be executables, object files, dynamic libraries, or archives. The workflow requires building an instrumented program, running it to create profile data, then using llvm-profdata merge to prepare raw profile data. The gcov command is compatible with GCC 4.2’s gcov and may work with some later versions. LLVM lists Linux, macOS, and Windows support. The tool is free, with a listed price of free, and is part of LLVM’s developer toolchain. LLVM cautions that its language frontends and related compiler components are not hardened against malicious input.
Who it suits
It suits developers examining coverage in instrumented C, C++, Objective-C, or Objective-C++ programs. Teams already using LLVM’s developer toolchain can use its text or structured coverage reports.
Good to know, and what to watch
- Supports line, function, branch, region, and MC/DC coverage
- Offers text, HTML, JSON, and LCOV reports
- Accepts executables, object files, libraries, and archives
- Free and available on Linux, macOS, and Windows
- Requires building and running an instrumented program
- Raw profiles require processing with llvm-profdata merge
- LLVM components are not hardened against malicious input
Plans
Every plan and priceLLVM llvm-cov
Free plan
The verdict
LLVM llvm-cov provides several ways to inspect and export coverage, from source-line views to summary statistics. Its workflow depends on instrumented builds and prepared profile data, and LLVM warns about malicious inputs to its compiler components.
What the maker publishes
- Audience
- The tool is for examining code coverage of instrumented programs; LLVM documents it as part of its developer toolchain. source
- Commands
- The documented commands include gcov, show, report, and export. source
- Compatibility
- The gcov subcommand is compatible with gcov from GCC 4.2 and may work with some later gcov versions. source
- Coverage modes
- It works with gcov-style coverage or Clang instrumentation-based profiling. source
- Downloads
- The LLVM release page says source packages and Git tags are signed by release managers and provides keys for verification. source
- Export formats
- Coverage can be exported as JSON or lcov trace format, with regions, functions, branches, expansions, and summaries available in JSON. source
- HTML reports
- Clang's source-based coverage guide says llvm-cov can generate HTML reports. source
- Inputs
- The documented binary input may be an executable, object file, dynamic library, or archive. source
- Integrations
- The documentation describes using llvm-profdata to merge raw or indexed profiles and exporting coverage in lcov format. source
- Line reports
- The show command displays line-by-line coverage and can filter results to specified source files. source
- Purpose
- llvm-cov shows code coverage information for programs instrumented to emit profile data. source
- Security
- LLVM says its language frontends, analyzers, optimizers, and code generators are not hardened against malicious input, which can cause arbitrary code execution in LLVM. source
- Summary metrics
- The report command can display coverage summaries, including branch statistics, function coverage, and MC/DC statistics. source
- Workflow
- Coverage requires building an instrumented program, running it to produce profile data, and converting raw profile data with llvm-profdata merge for use by llvm-cov. source
Checked against the maker's pages on 5 Oct 2026.