Function rustc_codegen_llvm::coverageinfo::mapgen::finalize
source · pub fn finalize(cx: &CodegenCx<'_, '_>)
Expand description
Generates and exports the Coverage Map.
Rust Coverage Map generation supports LLVM Coverage Mapping Format version
6 (zero-based encoded as 5), as defined at
LLVM Code Coverage Mapping Format.
These versions are supported by the LLVM coverage tools (llvm-profdata
and llvm-cov
)
bundled with Rust’s fork of LLVM.
Consequently, Rust’s bundled version of Clang also generates Coverage Maps compliant with the same version. Clang’s implementation of Coverage Map generation was referenced when implementing this Rust version, and though the format documentation is very explicit and detailed, some undocumented details in Clang’s implementation (that may or may not be important) were also replicated for Rust’s Coverage Map.