about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-11-03 15:15:46 +1100
committerZalathar <Zalathar@users.noreply.github.com>2024-11-04 20:31:16 +1100
commit5bfa0b106e253e6f8ed93d4c4f44534ccbb13c85 (patch)
tree0a2df267d4bdff3fd09798a98b52e8786d7c5188 /compiler/rustc_codegen_llvm/src/llvm
parent43c78051ea96f89ecf33533dfed6db6f1eeba150 (diff)
downloadrust-5bfa0b106e253e6f8ed93d4c4f44534ccbb13c85.tar.gz
rust-5bfa0b106e253e6f8ed93d4c4f44534ccbb13c85.zip
Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index d84ae8d8836..2f75457990e 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -1765,11 +1765,13 @@ unsafe extern "C" {
     /// Returns a string describing the last error caused by an LLVMRust* call.
     pub fn LLVMRustGetLastError() -> *const c_char;
 
-    /// Print the pass timings since static dtors aren't picking them up.
-    pub fn LLVMRustPrintPassTimings(size: *const size_t) -> *const c_char;
+    /// Prints the timing information collected by `-Ztime-llvm-passes`.
+    #[expect(improper_ctypes)]
+    pub(crate) fn LLVMRustPrintPassTimings(OutStr: &RustString);
 
-    /// Print the statistics since static dtors aren't picking them up.
-    pub fn LLVMRustPrintStatistics(size: *const size_t) -> *const c_char;
+    /// Prints the statistics collected by `-Zprint-codegen-stats`.
+    #[expect(improper_ctypes)]
+    pub(crate) fn LLVMRustPrintStatistics(OutStr: &RustString);
 
     /// Prepares inline assembly.
     pub fn LLVMRustInlineAsm(