about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/profiling.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-26 22:56:04 +0000
committerbors <bors@rust-lang.org>2024-08-26 22:56:04 +0000
commitbf662eb80838008acabc307dd64d84935ce3a20d (patch)
tree006b9ca64ea7386554102510b11aeae3a707984b /compiler/rustc_codegen_llvm/src/back/profiling.rs
parent515395af0efdbdd657ff08a1f6d28e553856654f (diff)
parentb3b6baf8336c4a016580bdf6e210ec1925c738ad (diff)
downloadrust-bf662eb80838008acabc307dd64d84935ce3a20d.tar.gz
rust-bf662eb80838008acabc307dd64d84935ce3a20d.zip
Auto merge of #129632 - matthiaskrgr:rollup-8055gq6, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #126013 (Add `#[warn(unreachable_pub)]` to a bunch of compiler crates)
 - #128157 (deduplicate and clarify rules for converting pointers to references)
 - #129032 (Document & implement the transmutation modeled by `BikeshedIntrinsicFrom`)
 - #129250 (Do not ICE on non-ADT rcvr type when looking for crate version collision)
 - #129340 (Remove Duplicate E0381 Label)
 - #129560 ([rustdoc] Generate source link on impl associated types)
 - #129622 (Remove a couple of unused feature enables)
 - #129625 (Rename `ParenthesizedGenericArgs` to `GenericArgsMode`)
 - #129626 (Remove `ParamMode::ExplicitNamed`)

Failed merges:

 - #128166 (Improved `checked_isqrt` and `isqrt` methods)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/profiling.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/profiling.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/profiling.rs b/compiler/rustc_codegen_llvm/src/back/profiling.rs
index 26fb4a96f84..79794775b7b 100644
--- a/compiler/rustc_codegen_llvm/src/back/profiling.rs
+++ b/compiler/rustc_codegen_llvm/src/back/profiling.rs
@@ -21,14 +21,14 @@ fn llvm_args_to_string_id(profiler: &SelfProfiler, pass_name: &str, ir_name: &st
     EventId::from_label(profiler.alloc_string(components.as_slice()))
 }
 
-pub struct LlvmSelfProfiler<'a> {
+pub(crate) struct LlvmSelfProfiler<'a> {
     profiler: Arc<SelfProfiler>,
     stack: Vec<TimingGuard<'a>>,
     llvm_pass_event_kind: StringId,
 }
 
 impl<'a> LlvmSelfProfiler<'a> {
-    pub fn new(profiler: Arc<SelfProfiler>) -> Self {
+    pub(crate) fn new(profiler: Arc<SelfProfiler>) -> Self {
         let llvm_pass_event_kind = profiler.alloc_string("LLVM Pass");
         Self { profiler, stack: Vec::default(), llvm_pass_event_kind }
     }
@@ -43,7 +43,7 @@ impl<'a> LlvmSelfProfiler<'a> {
     }
 }
 
-pub unsafe extern "C" fn selfprofile_before_pass_callback(
+pub(crate) unsafe extern "C" fn selfprofile_before_pass_callback(
     llvm_self_profiler: *mut c_void,
     pass_name: *const c_char,
     ir_name: *const c_char,
@@ -56,7 +56,7 @@ pub unsafe extern "C" fn selfprofile_before_pass_callback(
     }
 }
 
-pub unsafe extern "C" fn selfprofile_after_pass_callback(llvm_self_profiler: *mut c_void) {
+pub(crate) unsafe extern "C" fn selfprofile_after_pass_callback(llvm_self_profiler: *mut c_void) {
     let llvm_self_profiler = unsafe { &mut *(llvm_self_profiler as *mut LlvmSelfProfiler<'_>) };
     llvm_self_profiler.after_pass_callback();
 }