Compiler for LLVM modules.
More...
#include <LLVMCompiler.hpp>
|
virtual bool | compile_to_elf (llvm::Module &mod, std::vector< uint8_t > &buf) noexcept=0 |
|
virtual JITMapper | compile_and_map (llvm::Module &mod, std::function< void *(std::string_view)> resolver) noexcept=0 |
|
Compiler for LLVM modules.
Definition at line 48 of file LLVMCompiler.hpp.
◆ compile_and_map()
virtual JITMapper tpde_llvm::LLVMCompiler::compile_and_map |
( |
llvm::Module & | mod, |
|
|
std::function< void *(std::string_view)> | resolver ) |
|
pure virtualnoexcept |
Compile the module and map it into memory, calling resolver to resolve references to external symbols. This function will also register unwind information. The module might be modified during compilation.
◆ compile_to_elf()
virtual bool tpde_llvm::LLVMCompiler::compile_to_elf |
( |
llvm::Module & | mod, |
|
|
std::vector< uint8_t > & | buf ) |
|
pure virtualnoexcept |
Compile the module to an object file and emit it into the buffer. The module might be modified during compilation.
- Returns
- true on success.
◆ create()
static std::unique_ptr< LLVMCompiler > tpde_llvm::LLVMCompiler::create |
( |
const llvm::Triple & | triple | ) |
|
|
staticnoexcept |
Create a compiler for the specified target triple; returns null if the triple is not supported. The only supported code model is small, the only supported relocation model is PIC.
The documentation for this class was generated from the following file: