Rollup merge of #132590 - Zalathar:z-timings-stats, r=jieyouxu
Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats` The existing code for these unstable LLVM-infodump flags was jumping through hoops to pass an allocated C string across the FFI boundary, when it's much simpler to just write to a `&RustString` instead.
This commit is contained in:
commit
3a48d80155
3 changed files with 16 additions and 45 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue