[−][src]Function rustc_codegen_llvm::coverageinfo::mapgen::finalize
pub fn finalize<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>)
Generates and exports the Coverage Map.
This Coverage Map complies with Coverage Mapping Format version 3 (zero-based encoded as 2),
as defined at LLVM Code Coverage Mapping Format
and published in Rust's current (July 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 version 3. 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.