Struct llvm_kaleidoscope_rs::llvm::IRBuilder
source · [−]pub struct IRBuilder<'llvm> { /* private fields */ }
Expand description
Wrapper for a LLVM IR Builder.
Implementations
sourceimpl<'llvm> IRBuilder<'llvm>
impl<'llvm> IRBuilder<'llvm>
sourcepub fn with_ctx(module: &'llvm Module) -> IRBuilder<'llvm>
pub fn with_ctx(module: &'llvm Module) -> IRBuilder<'llvm>
Create a new LLVM IR Builder with the module
s context.
Panics
Panics if creating the IR Builder fails.
sourcepub fn pos_at_end(&self, bb: BasicBlock<'llvm>)
pub fn pos_at_end(&self, bb: BasicBlock<'llvm>)
Position the IR Builder at the end of the given Basic Block.
sourcepub fn get_insert_block(&self) -> BasicBlock<'llvm>
pub fn get_insert_block(&self) -> BasicBlock<'llvm>
Get the BasicBlock the IRBuilder currently inputs into.
Panics
Panics if LLVM API returns a null
pointer.
sourcepub fn br(&self, dest: BasicBlock<'llvm>)
pub fn br(&self, dest: BasicBlock<'llvm>)
sourcepub fn cond_br(
&self,
cond: Value<'llvm>,
then: BasicBlock<'llvm>,
else_: BasicBlock<'llvm>
)
pub fn cond_br(
&self,
cond: Value<'llvm>,
then: BasicBlock<'llvm>,
else_: BasicBlock<'llvm>
)
Trait Implementations
Auto Trait Implementations
impl<'llvm> RefUnwindSafe for IRBuilder<'llvm>
impl<'llvm> !Send for IRBuilder<'llvm>
impl<'llvm> !Sync for IRBuilder<'llvm>
impl<'llvm> Unpin for IRBuilder<'llvm>
impl<'llvm> UnwindSafe for IRBuilder<'llvm>
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