rustc_codegen_llvm::coverageinfo::mapgen

Function encode_mappings_for_function

Source
fn encode_mappings_for_function(
    global_file_table: &GlobalFileTable,
    function_coverage: &FunctionCoverage<'_>,
) -> Vec<u8>
Expand description

Using the expressions and counter regions collected for a single function, generate the variable-sized payload of its corresponding __llvm_covfun entry. The payload is returned as a vector of bytes.

Newly-encountered filenames will be added to the global file table.