rustc_codegen_ssa::traits::coverageinfo

Trait CoverageInfoBuilderMethods

Source
pub trait CoverageInfoBuilderMethods<'tcx> {
    // Required method
    fn add_coverage(&mut self, instance: Instance<'tcx>, kind: &CoverageKind);

    // Provided method
    fn init_coverage(&mut self, _instance: Instance<'tcx>) { ... }
}

Required Methods§

Source

fn add_coverage(&mut self, instance: Instance<'tcx>, kind: &CoverageKind)

Handle the MIR coverage info in a backend-specific way.

This can potentially be a no-op in backends that don’t support coverage instrumentation.

Provided Methods§

Source

fn init_coverage(&mut self, _instance: Instance<'tcx>)

Performs any start-of-function codegen needed for coverage instrumentation.

Can be a no-op in backends that don’t support coverage instrumentation.

Implementors§