rustc_codegen_ssa/mir/
coverageinfo.rsuse rustc_middle::mir::SourceScope;
use rustc_middle::mir::coverage::CoverageKind;
use super::FunctionCx;
use crate::traits::*;
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
pub(crate) fn codegen_coverage(&self, bx: &mut Bx, kind: &CoverageKind, scope: SourceScope) {
let instance = if let Some(inlined) = scope.inlined_instance(&self.mir.source_scopes) {
self.monomorphize(inlined)
} else {
self.instance
};
bx.add_coverage(instance, kind);
}
}