Use LLVMDisposeTargetMachine

This commit is contained in:
Zalathar
2025-09-25 18:10:55 +10:00
parent ae12bc21d8
commit 85018f09f6
3 changed files with 3 additions and 8 deletions

View File

@@ -359,10 +359,6 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
return wrap(TM);
}
extern "C" void LLVMRustDisposeTargetMachine(LLVMTargetMachineRef TM) {
delete unwrap(TM);
}
// Unfortunately, the LLVM C API doesn't provide a way to create the
// TargetLibraryInfo pass, so we use this method to do so.
extern "C" void LLVMRustAddLibraryInfo(LLVMPassManagerRef PMR, LLVMModuleRef M,