Skip to main content

Module covfun

Module covfun 

Source
Expand description

For each function that was instrumented for coverage, we need to embed its corresponding coverage mapping metadata inside the __llvm_covfun1 linker section of the final binary.


  1. On Windows the section name is .lcovfunโ†ฉ

Structsยง

BranchMapping ๐Ÿ”’
Resolved from MappingKind::Branch, and the precursor to ffi::BranchRegion.
CodeMapping ๐Ÿ”’
Resolved from MappingKind::Code, and the precursor to ffi::CodeRegion.
CovfunRecord ๐Ÿ”’
Intermediate coverage metadata for a single function, used to help build the final record that will be embedded in the __llvm_covfun section.
ResolvedMappings ๐Ÿ”’
Intermediate representation of coverage mappings, after all mapping spans have been resolved to file coordinates (or discarded), but before producing a final llvm_cov::Regions.

Functionsยง

counter_for_term ๐Ÿ”’
emit_covfun_record ๐Ÿ”’
Generates and emits the covfun record for this function, which contains the functionโ€™s coverage mapping data. The record is emitted as a global variable in the __llvm_covfun section.
fill_region_tables ๐Ÿ”’
Populates the mapping region tables for the current functionโ€™s covfun record.
prepare_covfun_record ๐Ÿ”’
prepare_expressions ๐Ÿ”’
Convert the functionโ€™s coverage-counter expressions into a form suitable for FFI.
prepare_resolved_mappings ๐Ÿ”’