struct CoverageMapGenerator {
filenames: FxIndexSet<CString>,
}
Fields
filenames: FxIndexSet<CString>
Implementations
sourceimpl CoverageMapGenerator
impl CoverageMapGenerator
fn new(tcx: TyCtxt<'_>, version: u32) -> Self
sourcefn write_coverage_mapping<'a>(
&mut self,
expressions: Vec<CounterExpression>,
counter_regions: impl Iterator<Item = (Counter, &'a CodeRegion)>,
coverage_mapping_buffer: &RustString
)
fn write_coverage_mapping<'a>(
&mut self,
expressions: Vec<CounterExpression>,
counter_regions: impl Iterator<Item = (Counter, &'a CodeRegion)>,
coverage_mapping_buffer: &RustString
)
Using the expressions
and counter_regions
collected for the current function, generate
the mapping_regions
and virtual_file_mapping
, and capture any new filenames. Then use
LLVM APIs to encode the virtual_file_mapping
, expressions
, and mapping_regions
into
the given coverage_mapping
byte buffer, compliant with the LLVM Coverage Mapping format.
sourcefn generate_coverage_map<'ll>(
self,
cx: &CodegenCx<'ll, '_>,
version: u32,
filenames_size: usize,
filenames_val: &'ll Value
) -> &'ll Value
fn generate_coverage_map<'ll>(
self,
cx: &CodegenCx<'ll, '_>,
version: u32,
filenames_size: usize,
filenames_val: &'ll Value
) -> &'ll Value
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.
Auto Trait Implementations
impl RefUnwindSafe for CoverageMapGenerator
impl Send for CoverageMapGenerator
impl Sync for CoverageMapGenerator
impl Unpin for CoverageMapGenerator
impl UnwindSafe for CoverageMapGenerator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes