]>
git.proxmox.com Git - rustc.git/blob - compiler/rustc_codegen_ssa/src/mir/coverageinfo.rs
3 use rustc_middle
::mir
::Coverage
;
4 use rustc_middle
::mir
::SourceScope
;
8 impl<'a
, 'tcx
, Bx
: BuilderMethods
<'a
, 'tcx
>> FunctionCx
<'a
, 'tcx
, Bx
> {
9 pub fn codegen_coverage(&self, bx
: &mut Bx
, coverage
: &Coverage
, scope
: SourceScope
) {
10 // Determine the instance that coverage data was originally generated for.
11 let instance
= if let Some(inlined
) = scope
.inlined_instance(&self.mir
.source_scopes
) {
12 self.monomorphize(inlined
)
17 // Handle the coverage info in a backend-specific way.
18 bx
.add_coverage(instance
, coverage
);