Module rustc_codegen_llvm::coverageinfo::mapgen

source ·

Structs§

Functions§

  • Each CGU will normally only emit coverage metadata for the functions that it actually generates. But since we don’t want unused functions to disappear from coverage reports, we also scan for functions that were instrumented but are not participating in codegen.
  • 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.
  • finalize 🔒
    Generates and exports the Coverage Map.
  • Construct coverage map header and the array of function records, and combine them into the coverage map. Save the coverage map data into the LLVM IR as a static global using a specific, well-known section and name.
  • Prepare sets of definitions that are relevant to deciding whether something is an “unused function” for coverage purposes.
  • Construct a function record and combine it with the function’s coverage mapping data. Save the function record into the LLVM IR as a static global using a specific, well-known section and name.