LLVMJIT: Free created module in LLVM < 5.

Due to the differing APIs between versions, I forgot to deallocate the
generated module in older LLVM versions, leading to a memory leak.

Author: Andres Freund
This commit is contained in:
Andres Freund 2018-03-26 16:04:39 -07:00
parent 0976c4ddd4
commit 071371bc43
1 changed files with 1 additions and 0 deletions

View File

@ -531,6 +531,7 @@ llvm_compile_module(LLVMJitContext *context)
{
orc_handle = LLVMOrcAddEagerlyCompiledIR(compile_orc, context->module,
llvm_resolve_symbol, NULL);
LLVMDisposeModule(context->module);
}
#else
{