1
Fork 0

Add warn(unreachable_pub) to rustc_codegen_llvm.

This commit is contained in:
Nicholas Nethercote 2024-07-06 22:26:42 +10:00
parent 0544d3a952
commit 61627438eb
31 changed files with 206 additions and 184 deletions

View file

@ -22,10 +22,10 @@ use crate::llvm;
pub(crate) mod ffi;
pub(crate) mod map_data;
pub mod mapgen;
mod mapgen;
/// A context object for maintaining all state needed by the coverageinfo module.
pub struct CrateCoverageContext<'ll, 'tcx> {
pub(crate) struct CrateCoverageContext<'ll, 'tcx> {
/// Coverage data for each instrumented function identified by DefId.
pub(crate) function_coverage_map:
RefCell<FxIndexMap<Instance<'tcx>, FunctionCoverageCollector<'tcx>>>,
@ -34,7 +34,7 @@ pub struct CrateCoverageContext<'ll, 'tcx> {
}
impl<'ll, 'tcx> CrateCoverageContext<'ll, 'tcx> {
pub fn new() -> Self {
pub(crate) fn new() -> Self {
Self {
function_coverage_map: Default::default(),
pgo_func_name_var_map: Default::default(),
@ -42,7 +42,7 @@ impl<'ll, 'tcx> CrateCoverageContext<'ll, 'tcx> {
}
}
pub fn take_function_coverage_map(
fn take_function_coverage_map(
&self,
) -> FxIndexMap<Instance<'tcx>, FunctionCoverageCollector<'tcx>> {
self.function_coverage_map.replace(FxIndexMap::default())