LLVM llvm-cov
LLVM llvm-cov reports code coverage for programs built with instrumentation that produces profile data.
What LLVM llvm-cov is
LLVM llvm-cov reports code coverage for programs built with instrumentation that produces profile data. It supports gcov-style coverage and Clang instrumentation-based profiling, with coverage types including function, instantiation, line, region, branch, and MC/DC. Its commands include gcov, show, report, and export. The show command presents coverage line by line and can be limited to chosen source files; report can provide summaries with branch, function, and MC/DC statistics. Output formats include text, HTML, JSON, and LCOV. JSON can contain regions, functions, branches, expansions, and summaries, while export supports JSON and lcov trace format. Inputs can be executables, object files, dynamic libraries, or archives. The workflow requires building and running an instrumented program, then processing raw profile data with llvm-profdata merge. The gcov subcommand is compatible with gcov from GCC 4.2 and may work with some later versions. LLVM lists Linux, macOS, and Windows support. LLVM also cautions that its language frontends, analyzers, optimizers, and code generators are not hardened against malicious input.
Good
- Supports gcov-style and Clang instrumentation coverage.
- Reports line, branch, function, and MC/DC coverage.
- Exports JSON and lcov trace format.
- Available for Linux, macOS, and Windows.
Watch out
- Requires an instrumented build and profile data.
- Raw profile data must be processed with llvm-profdata merge.
- LLVM warns its toolchain components are not hardened against malicious input.
Who it suits
llvm-cov is for developers examining coverage from instrumented C, C++, Objective-C, or Objective-C++ programs. It may suit teams that need line-level details, summary metrics, or machine-readable coverage exports.
Verdict
llvm-cov provides several ways to inspect and export coverage, but it depends on an instrumentation and profile-processing workflow. Keep LLVM's warning about malicious input in mind when handling untrusted inputs.
Plans and prices
From LLVM llvm-cov's own pricing page, checked 5 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| LLVM llvm-cov | Free | Open source LLVM tool; no paid plans or usage limits stated |
The facts
Each one read from LLVM llvm-cov's own pages, with the date it was checked.
What it does
- Audience
- The tool is for examining code coverage of instrumented programs; LLVM documents it as part of its developer toolchain.checked 5 Oct 2026
- Commands
- The documented commands include gcov, show, report, and export.checked 5 Oct 2026
- Compatibility
- The gcov subcommand is compatible with gcov from GCC 4.2 and may work with some later gcov versions.checked 5 Oct 2026
- Coverage modes
- It works with gcov-style coverage or Clang instrumentation-based profiling.checked 5 Oct 2026
- Downloads
- The LLVM release page says source packages and Git tags are signed by release managers and provides keys for verification.checked 5 Oct 2026
- Export formats
- Coverage can be exported as JSON or lcov trace format, with regions, functions, branches, expansions, and summaries available in JSON.checked 5 Oct 2026
- HTML reports
- Clang's source-based coverage guide says llvm-cov can generate HTML reports.checked 5 Oct 2026
- Inputs
- The documented binary input may be an executable, object file, dynamic library, or archive.checked 5 Oct 2026
- Integrations
- The documentation describes using llvm-profdata to merge raw or indexed profiles and exporting coverage in lcov format.checked 5 Oct 2026
- Line reports
- The show command displays line-by-line coverage and can filter results to specified source files.checked 5 Oct 2026
- Purpose
- llvm-cov shows code coverage information for programs instrumented to emit profile data.checked 5 Oct 2026
- 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.checked 5 Oct 2026
- Summary metrics
- The report command can display coverage summaries, including branch statistics, function coverage, and MC/DC statistics.checked 5 Oct 2026
- 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.checked 5 Oct 2026
Alternatives to LLVM llvm-cov
- 1

Codecov
Free planOpen sourceWebAPIExtensionLinux8.0From $5 a month - 2
Avidemux
Free planOpen sourceWebLinuxmacOSWindows7.3Free plan - 3
Coverage.py
Free planOpen sourceAPILinuxmacOSSelf-hosted7.3Free plan - 4

Coveralls
Free planWebAPILinuxSelf-hosted6.8From $10 a month - 5
ReportGenerator
Free planLinuxmacOSWindows6.8$79 one-time - 6
gcov
Free planLinuxmacOSWindows6.5Free plan
