xo-jit: + LlvmContext to keepalive native LLVMContext
This commit is contained in:
parent
f3af5d27bf
commit
a927d44e0e
7 changed files with 94 additions and 17 deletions
20
src/jit/LlvmContext.cpp
Normal file
20
src/jit/LlvmContext.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* @file LlvmContext.cpp */
|
||||
|
||||
#include "LlvmContext.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace jit {
|
||||
xo::ref::rp<LlvmContext>
|
||||
LlvmContext::make() {
|
||||
return new LlvmContext();
|
||||
}
|
||||
|
||||
LlvmContext::LlvmContext()
|
||||
: llvm_cx_{std::make_unique<llvm::LLVMContext>()}
|
||||
{}
|
||||
|
||||
} /*namespace jit*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
/* end LlvmContext.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue