about summary refs log tree commit diff
path: root/src/librustc_middle/mir/coverage/mod.rs
blob: 82365ef6a73de8ebb2e5f05ad0af9d2717b3a328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! Metadata from source code coverage analysis and instrumentation.

/// Positional arguments to `libcore::count_code_region()`
pub mod count_code_region_args {
    pub const FUNCTION_SOURCE_HASH: usize = 0;
    pub const COUNTER_ID: usize = 1;
    pub const START_BYTE_POS: usize = 2;
    pub const END_BYTE_POS: usize = 3;
}

/// Positional arguments to `libcore::coverage_counter_add()` and
/// `libcore::coverage_counter_subtract()`
pub mod coverage_counter_expression_args {
    pub const EXPRESSION_ID: usize = 0;
    pub const LEFT_ID: usize = 1;
    pub const RIGHT_ID: usize = 2;
    pub const START_BYTE_POS: usize = 3;
    pub const END_BYTE_POS: usize = 4;
}

/// Positional arguments to `libcore::coverage_unreachable()`
pub mod coverage_unreachable_args {
    pub const START_BYTE_POS: usize = 0;
    pub const END_BYTE_POS: usize = 1;
}