pub struct LLJIT {
jit: LLVMOrcLLJITRef,
}
Expand description
An ORC JIT.
Manages the memory of all JIT’d code and all modules that are transferred to it.
See the ORCv2 docs.
Fields§
§jit: LLVMOrcLLJITRef
Implementations§
Source§impl LLJIT
impl LLJIT
Sourcepub fn builder() -> LLJITBuilder
pub fn builder() -> LLJITBuilder
Creates a new LLJIT builder.
Sourcepub fn new() -> Result<Self, LLVMString>
pub fn new() -> Result<Self, LLVMString>
Creates a new ORC JIT with a target machine for the host.
Sourcepub unsafe fn from_inner(jit: LLVMOrcLLJITRef) -> Self
pub unsafe fn from_inner(jit: LLVMOrcLLJITRef) -> Self
Wraps a raw pointer.
Sourcepub fn get_triple_string(&self) -> &CStr
pub fn get_triple_string(&self) -> &CStr
Return the target triple for this LLJIT instance.
Sourcepub fn get_data_layout_string(&self) -> &CStr
pub fn get_data_layout_string(&self) -> &CStr
Return the data layout for this LLJIT instance.
Sourcepub fn get_global_prefix(&self) -> c_char
pub fn get_global_prefix(&self) -> c_char
Returns the global prefix character according to the LLJIT’s DataLayout.
Sourcepub fn add_module(&self, tsm: ThreadSafeModule) -> Result<(), LLVMString>
pub fn add_module(&self, tsm: ThreadSafeModule) -> Result<(), LLVMString>
Add an IR module to the main JITDylib.
Sourcepub fn add_module_with_dylib(
&self,
tsm: ThreadSafeModule,
jd: JITDylibRef,
) -> Result<(), LLVMString>
pub fn add_module_with_dylib( &self, tsm: ThreadSafeModule, jd: JITDylibRef, ) -> Result<(), LLVMString>
Add an IR module to the given JITDylib.
Sourcepub fn add_module_with_rt(
&self,
tsm: ThreadSafeModule,
jd: ResourceTracker,
) -> Result<(), LLVMString>
pub fn add_module_with_rt( &self, tsm: ThreadSafeModule, jd: ResourceTracker, ) -> Result<(), LLVMString>
Add an IR module to the given ResourceTracker’s JITDylib.
Sourcepub fn get_execution_session(&self) -> ExecutionSessionRef<'_>
pub fn get_execution_session(&self) -> ExecutionSessionRef<'_>
Gets the execution session.
Sourcepub fn get_main_jit_dylib(&self) -> JITDylibRef
pub fn get_main_jit_dylib(&self) -> JITDylibRef
Return a reference to the Main JITDylib.
Sourcepub fn mangle_and_intern(&self, unmangled_name: &CStr) -> SymbolStringPoolEntry
pub fn mangle_and_intern(&self, unmangled_name: &CStr) -> SymbolStringPoolEntry
Mangles the given string according to the LLJIT instance’s DataLayout, then interns the result in the SymbolStringPool and returns a reference to the pool entry.
Sourcepub fn lookup(&self, name: &CStr) -> Result<usize, LLVMString>
pub fn lookup(&self, name: &CStr) -> Result<usize, LLVMString>
Look up the given symbol in the main JITDylib of the given LLJIT instance.
Sourcepub fn lookup_unmangled(
&self,
unmangled_name: &CStr,
) -> Result<usize, LLVMString>
pub fn lookup_unmangled( &self, unmangled_name: &CStr, ) -> Result<usize, LLVMString>
Look up the given symbol in the main JITDylib of the given LLJIT instance.
The name should be mangled.
Sourcepub fn get_ir_transform_layer(&self) -> IRTransformLayerRef
pub fn get_ir_transform_layer(&self) -> IRTransformLayerRef
Returns a non-owning reference to the LLJIT instance’s IR transform layer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LLJIT
impl RefUnwindSafe for LLJIT
impl !Send for LLJIT
impl !Sync for LLJIT
impl Unpin for LLJIT
impl UnwindSafe for LLJIT
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes