1
Fork 0

Rust coverage before splitting instrument_coverage.rs

This commit is contained in:
Rich Kadel 2020-10-05 16:36:10 -07:00
parent 9d78d1d027
commit c7747cc772
214 changed files with 9845 additions and 1267 deletions

View file

@ -9,9 +9,13 @@ pub trait CoverageInfoMethods: BackendTypes {
pub trait CoverageInfoBuilderMethods<'tcx>: BackendTypes {
fn create_pgo_func_name_var(&self, instance: Instance<'tcx>) -> Self::Value;
/// Returns true if the function source hash was added to the coverage map; false if
/// `-Z instrument-coverage` is not enabled (a coverage map is not being generated).
fn set_function_source_hash(&mut self, instance: Instance<'tcx>, function_source_hash: u64) -> bool;
/// Returns true if the counter was added to the coverage map; false if `-Z instrument-coverage`
/// is not enabled (a coverage map is not being generated).
fn add_counter_region(
fn add_coverage_counter(
&mut self,
instance: Instance<'tcx>,
function_source_hash: u64,
@ -21,17 +25,17 @@ pub trait CoverageInfoBuilderMethods<'tcx>: BackendTypes {
/// Returns true if the expression was added to the coverage map; false if
/// `-Z instrument-coverage` is not enabled (a coverage map is not being generated).
fn add_counter_expression_region(
fn add_coverage_counter_expression(
&mut self,
instance: Instance<'tcx>,
id: InjectedExpressionIndex,
id: InjectedExpressionId,
lhs: ExpressionOperandId,
op: Op,
rhs: ExpressionOperandId,
region: CodeRegion,
) -> bool;
region: Option<CodeRegion>,
);
/// Returns true if the region was added to the coverage map; false if `-Z instrument-coverage`
/// is not enabled (a coverage map is not being generated).
fn add_unreachable_region(&mut self, instance: Instance<'tcx>, region: CodeRegion) -> bool;
fn add_coverage_unreachable(&mut self, instance: Instance<'tcx>, region: CodeRegion) -> bool;
}