Struct llvm_kaleidoscope_rs::llvm::Module
source · [−]pub struct Module { /* private fields */ }
Expand description
Wrapper for a LLVM Module with its own LLVM Context.
Implementations
sourceimpl<'llvm> Module
impl<'llvm> Module
sourcepub fn type_fn(
&'llvm self,
args: &mut [Type<'llvm>],
ret: Type<'llvm>
) -> Type<'llvm>
pub fn type_fn(
&'llvm self,
args: &mut [Type<'llvm>],
ret: Type<'llvm>
) -> Type<'llvm>
Get a type reference representing a fn(args) -> ret
function.
Panics
Panics if LLVM API returns a null
pointer.
sourcepub fn append_basic_block(
&'llvm self,
fn_value: FnValue<'llvm>
) -> BasicBlock<'llvm>
pub fn append_basic_block(
&'llvm self,
fn_value: FnValue<'llvm>
) -> BasicBlock<'llvm>
Append a Basic Block to the end of the function referenced by the value reference
fn_value
.
Panics
Panics if LLVM API returns a null
pointer.
sourcepub fn create_basic_block(&self) -> BasicBlock<'llvm>
pub fn create_basic_block(&self) -> BasicBlock<'llvm>
Create a free-standing Basic Block without adding it to a function.
This can be added to a function at a later point in time with
FnValue::append_basic_block
.
Panics
Panics if LLVM API returns a null
pointer.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Module
impl !Send for Module
impl !Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more