Module rustc_mir::transform::coverage::query[−][src]

Structs

CoverageVisitor

The num_counters argument to llvm.instrprof.increment is the max counter_id + 1, or in other words, the number of counter value references injected into the MIR (plus 1 for the reserved ZERO counter, which uses counter ID 0 when included in an expression). Injected counters have a counter ID from 1..num_counters-1.

Functions

coverageinfo_from_mir
covered_code_regions
covered_file_name
is_inlined
mir_body

This function ensures we obtain the correct MIR for the given item irrespective of whether that means const mir or runtime mir. For const fn this opts for runtime mir.

provide

The query provider for CoverageInfo, requested by codegen_coverage() (to inject each counter) and FunctionCoverage::new() (to extract the coverage map metadata from the MIR).