Skip to content

Commit 108922b

Browse files
committed
Auto merge of rust-lang#75563 - richkadel:llvm-coverage-map-gen-5.4, r=wesleywiser
Moved coverage counter injection from BasicBlock to Statement. As discussed on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implement.20LLVM-compatible.20source-based.20cod.20compiler-team.23278
2 parents a9916b6 + 42a8a52 commit 108922b

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

core/src/intrinsics.rs

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,70 +1949,6 @@ extern "rust-intrinsic" {
19491949
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")]
19501950
pub fn ptr_offset_from<T>(ptr: *const T, base: *const T) -> isize;
19511951

1952-
/// Internal placeholder for injecting code coverage counters when the "instrument-coverage"
1953-
/// option is enabled. The source code region information is extracted prior to code generation,
1954-
/// and added to the "coverage map", which is injected into the generated code as additional
1955-
/// data. This intrinsic then triggers the generation of LLVM intrinsic call
1956-
/// `instrprof.increment`, using the remaining args (`function_source_hash` and `index`).
1957-
#[cfg(not(bootstrap))]
1958-
#[lang = "count_code_region"]
1959-
pub fn count_code_region(
1960-
function_source_hash: u64,
1961-
index: u32,
1962-
file_name: &'static str,
1963-
start_line: u32,
1964-
start_col: u32,
1965-
end_line: u32,
1966-
end_col: u32,
1967-
);
1968-
1969-
/// Internal marker for code coverage expressions, injected into the MIR when the
1970-
/// "instrument-coverage" option is enabled. This intrinsic is not converted into a
1971-
/// backend intrinsic call, but its arguments are extracted during the production of a
1972-
/// "coverage map", which is injected into the generated code, as additional data.
1973-
/// This marker identifies a code region and two other counters or counter expressions
1974-
/// whose sum is the number of times the code region was executed.
1975-
#[cfg(not(bootstrap))]
1976-
#[lang = "coverage_counter_add"]
1977-
pub fn coverage_counter_add(
1978-
index: u32,
1979-
left_index: u32,
1980-
right_index: u32,
1981-
file_name: &'static str,
1982-
start_line: u32,
1983-
start_col: u32,
1984-
end_line: u32,
1985-
end_col: u32,
1986-
);
1987-
1988-
/// This marker identifies a code region and two other counters or counter expressions
1989-
/// whose difference is the number of times the code region was executed.
1990-
/// (See `coverage_counter_add` for more information.)
1991-
#[cfg(not(bootstrap))]
1992-
#[lang = "coverage_counter_subtract"]
1993-
pub fn coverage_counter_subtract(
1994-
index: u32,
1995-
left_index: u32,
1996-
right_index: u32,
1997-
file_name: &'static str,
1998-
start_line: u32,
1999-
start_col: u32,
2000-
end_line: u32,
2001-
end_col: u32,
2002-
);
2003-
2004-
/// This marker identifies a code region to be added to the "coverage map" to indicate source
2005-
/// code that can never be reached.
2006-
/// (See `coverage_counter_add` for more information.)
2007-
#[cfg(not(bootstrap))]
2008-
pub fn coverage_unreachable(
2009-
file_name: &'static str,
2010-
start_line: u32,
2011-
start_col: u32,
2012-
end_line: u32,
2013-
end_col: u32,
2014-
);
2015-
20161952
/// See documentation of `<*const T>::guaranteed_eq` for details.
20171953
#[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
20181954
pub fn ptr_guaranteed_eq<T>(ptr: *const T, other: *const T) -> bool;

0 commit comments

Comments
 (0)