xo-jit: + LlvmContext to keepalive native LLVMContext

This commit is contained in:
Roland Conybeare 2024-06-16 11:00:37 -04:00
commit a927d44e0e
7 changed files with 94 additions and 17 deletions

20
src/jit/LlvmContext.cpp Normal file
View 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 */