Function rustc_codegen_llvm::coverageinfo::mapgen::finalize[][src]

pub fn finalize<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>)
Expand description

Generates and exports the Coverage Map.

This Coverage Map complies with Coverage Mapping Format version 4 (zero-based encoded as 3), as defined at LLVM Code Coverage Mapping Format and published in Rust’s November 2020 fork of LLVM. This version is 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.