[−][src]Struct rustc_codegen_llvm::coverageinfo::mapgen::CoverageMapGenerator
Fields
filenames: FxIndexSet<CString>Implementations
impl CoverageMapGenerator[src]
pub(in coverageinfo::mapgen) fn new(
) -> Self[src]
) -> Self
pub(in coverageinfo::mapgen) fn write_coverage_mappings<'a>(
&mut self,
expressions: Vec<CounterExpression>,
counter_regions: impl Iterator<Item = (Counter, &'a CodeRegion)>,
coverage_mappings_buffer: &RustString
)[src]
&mut self,
expressions: Vec<CounterExpression>,
counter_regions: impl Iterator<Item = (Counter, &'a CodeRegion)>,
coverage_mappings_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_mappings byte buffer, compliant with the LLVM Coverage Mapping format.
pub(in coverageinfo::mapgen) fn make_function_record<'ll, 'tcx>(
&mut self,
cx: &CodegenCx<'ll, 'tcx>,
mangled_function_name: String,
function_source_hash: u64,
mapping_data_size: usize
) -> &'ll Value[src]
&mut self,
cx: &CodegenCx<'ll, 'tcx>,
mangled_function_name: String,
function_source_hash: u64,
mapping_data_size: usize
) -> &'ll Value
Generate and return the function record Value
pub(in coverageinfo::mapgen) fn save_generated_coverage_map<'ll, 'tcx>(
self,
cx: &CodegenCx<'ll, 'tcx>,
function_records: Vec<&'ll Value>,
filenames_buffer: Vec<u8>,
coverage_mappings_buffer: Vec<u8>
)[src]
self,
cx: &CodegenCx<'ll, 'tcx>,
function_records: Vec<&'ll Value>,
filenames_buffer: Vec<u8>,
coverage_mappings_buffer: Vec<u8>
)
Combine the filenames and coverage mappings buffers, construct coverage map header and the array of function records, and combine everything into the complete 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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,