diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-09-25 20:32:00 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-25 20:32:00 +1000 |
| commit | 59866ef3058654a81a44e2869d6647d8ba39c0fe (patch) | |
| tree | 8290fc4a428c6cb0c7b0907954dae01c425d4d07 /compiler/rustc_codegen_llvm/src/llvm | |
| parent | a6325412f8c118668f869bad47551fb74f887f13 (diff) | |
| parent | 85018f09f67bd54868fe12a4632bbd637a474853 (diff) | |
| download | rust-59866ef3058654a81a44e2869d6647d8ba39c0fe.tar.gz rust-59866ef3058654a81a44e2869d6647d8ba39c0fe.zip | |
Rollup merge of #147015 - Zalathar:dispose-tm, r=lqd
Use `LLVMDisposeTargetMachine` After bumping the minimum LLVM version to 20 (rust-lang/rust#145071), we no longer need to run any custom code when disposing of a TargetMachine, so we can just use the upstream LLVM-C function.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index fd972f371df..38a6a311954 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -1053,6 +1053,8 @@ unsafe extern "C" { SLen: c_uint, ) -> MetadataKindId; + pub(crate) fn LLVMDisposeTargetMachine(T: ptr::NonNull<TargetMachine>); + // Create modules. pub(crate) fn LLVMModuleCreateWithNameInContext( ModuleID: *const c_char, @@ -2499,7 +2501,6 @@ unsafe extern "C" { UseWasmEH: bool, ) -> *mut TargetMachine; - pub(crate) fn LLVMRustDisposeTargetMachine(T: *mut TargetMachine); pub(crate) fn LLVMRustAddLibraryInfo<'a>( PM: &PassManager<'a>, M: &'a Module, |
