OSDN Git Service

[ORC] Fix a memory leak in the OrcV2 C API (and some comment typos).
authorLang Hames <lhames@gmail.com>
Thu, 1 Oct 2020 22:25:06 +0000 (15:25 -0700)
committerLang Hames <lhames@gmail.com>
Mon, 19 Oct 2020 08:59:03 +0000 (01:59 -0700)
commitc88d9eae8a71844b71ca529fd7b35d6025a84f55
tree4995f2fada6d813c22246ac5593bf9c4ec1755e5
parent069919c9ba33666786b80e89f30215ef2918ecdc
[ORC] Fix a memory leak in the OrcV2 C API (and some comment typos).

The LLVMOrcLLJITAddLLVMIRModule function was leaking its
LLVMOrcThreadSafeModuleRef argument. Wrapping the argument in a unique_ptr
fixes this.
llvm/include/llvm-c/Orc.h
llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp