25 friend class JITMapperImpl;
27 std::unique_ptr<JITMapperImpl> impl;
30 explicit JITMapper(std::unique_ptr<JITMapperImpl> impl)
noexcept;
33 JITMapper(
const JITMapper &) =
delete;
34 JITMapper(JITMapper &&other)
noexcept;
36 JITMapper &operator=(
const JITMapper &) =
delete;
37 JITMapper &operator=(JITMapper &&other)
noexcept;
44 operator bool() const noexcept {
return impl !=
nullptr; }
50 LLVMCompiler() =
default;
53 virtual ~LLVMCompiler();
55 LLVMCompiler(
const LLVMCompiler &) =
delete;
56 LLVMCompiler &operator=(
const LLVMCompiler &) =
delete;
61 static std::unique_ptr<LLVMCompiler>
62 create(
const llvm::Triple &triple)
noexcept;
68 std::vector<uint8_t> &buf)
noexcept = 0;
75 std::function<
void *(std::string_view)> resolver)
noexcept = 0;
void * lookup_global(llvm::GlobalValue *) noexcept
virtual JITMapper compile_and_map(llvm::Module &mod, std::function< void *(std::string_view)> resolver) noexcept=0
static std::unique_ptr< LLVMCompiler > create(const llvm::Triple &triple) noexcept
virtual bool compile_to_elf(llvm::Module &mod, std::vector< uint8_t > &buf) noexcept=0