diff options
| author | Baitinq <[email protected]> | 2025-06-04 00:39:22 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-06-04 00:39:22 +0200 |
| commit | 1d7383e1fe602abfd04cfdab615fe04de9fb9409 (patch) | |
| tree | 8358d6e398317d744f240415bcafb368b72f3c01 /src/bootstrap/codegen.src | |
| parent | Boostrap: Codegen: Generate object file (diff) | |
| download | pry-lang-1d7383e1fe602abfd04cfdab615fe04de9fb9409.tar.gz pry-lang-1d7383e1fe602abfd04cfdab615fe04de9fb9409.tar.bz2 pry-lang-1d7383e1fe602abfd04cfdab615fe04de9fb9409.zip | |
Bootstrap: Codegen: Fix memory leaks
Diffstat (limited to 'src/bootstrap/codegen.src')
| -rw-r--r-- | src/bootstrap/codegen.src | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bootstrap/codegen.src b/src/bootstrap/codegen.src index 43b83e1..db18380 100644 --- a/src/bootstrap/codegen.src +++ b/src/bootstrap/codegen.src @@ -54,6 +54,7 @@ let codegen_compile = (c: *codegen) => i64 { LLVMRelocDefault, LLVMCodeModelDefault, ); + LLVMDisposeMessage(triple); result = LLVMVerifyModule((*c).llvm_module, LLVMAbortProcessAction, message); if result != 0 { println("Verification output: %s", *message); @@ -69,6 +70,7 @@ let codegen_compile = (c: *codegen) => i64 { LLVMObjectFile, cast(**i8, null), ); + LLVMDisposeTargetMachine(target_machine); println("Object file generated: %s", filename); return 0; |