pub trait CoverageInfoBuilderMethods<'tcx>: BackendTypes {
fn set_function_source_hash(
&mut self,
instance: Instance<'tcx>,
function_source_hash: u64
) -> bool;
fn add_coverage_counter(
&mut self,
instance: Instance<'tcx>,
index: CounterValueReference,
region: CodeRegion
) -> bool;
fn add_coverage_counter_expression(
&mut self,
instance: Instance<'tcx>,
id: InjectedExpressionId,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
region: Option<CodeRegion>
) -> bool;
fn add_coverage_unreachable(
&mut self,
instance: Instance<'tcx>,
region: CodeRegion
) -> bool;
}
Required Methods
sourcefn set_function_source_hash(
&mut self,
instance: Instance<'tcx>,
function_source_hash: u64
) -> bool
fn set_function_source_hash(
&mut self,
instance: Instance<'tcx>,
function_source_hash: u64
) -> bool
Returns true if the function source hash was added to the coverage map (even if it had
already been added, for this instance). Returns false only if -C instrument-coverage
is
not enabled (a coverage map is not being generated).
sourcefn add_coverage_counter(
&mut self,
instance: Instance<'tcx>,
index: CounterValueReference,
region: CodeRegion
) -> bool
fn add_coverage_counter(
&mut self,
instance: Instance<'tcx>,
index: CounterValueReference,
region: CodeRegion
) -> bool
Returns true if the counter was added to the coverage map; false if -C instrument-coverage
is not enabled (a coverage map is not being generated).
sourcefn add_coverage_counter_expression(
&mut self,
instance: Instance<'tcx>,
id: InjectedExpressionId,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
region: Option<CodeRegion>
) -> bool
fn add_coverage_counter_expression(
&mut self,
instance: Instance<'tcx>,
id: InjectedExpressionId,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
region: Option<CodeRegion>
) -> bool
Returns true if the expression was added to the coverage map; false if
-C instrument-coverage
is not enabled (a coverage map is not being generated).
sourcefn add_coverage_unreachable(
&mut self,
instance: Instance<'tcx>,
region: CodeRegion
) -> bool
fn add_coverage_unreachable(
&mut self,
instance: Instance<'tcx>,
region: CodeRegion
) -> bool
Returns true if the region was added to the coverage map; false if -C instrument-coverage
is not enabled (a coverage map is not being generated).