Struct llvm_kaleidoscope_rs::llvm::FnValue
source · [−]#[repr(transparent)]pub struct FnValue<'llvm>(_);
Expand description
Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.
Implementations
sourceimpl<'llvm> FnValue<'llvm>
impl<'llvm> FnValue<'llvm>
sourcepub fn ret_type(&self) -> Type<'llvm>
pub fn ret_type(&self) -> Type<'llvm>
Get a type reference representing the return value of the given function value.
Panics
Panics if LLVM API returns a null
pointer.
sourcepub fn arg(&self, idx: usize) -> Value<'llvm>
pub fn arg(&self, idx: usize) -> Value<'llvm>
Get a value reference for the function argument at index idx
.
Panics
Panics if LLVM API returns a null
pointer or indexed out of bounds.
sourcepub fn basic_blocks(&self) -> usize
pub fn basic_blocks(&self) -> usize
Get the number of Basic Blocks for the given function value.
sourcepub fn append_basic_block(&self, bb: BasicBlock<'llvm>)
pub fn append_basic_block(&self, bb: BasicBlock<'llvm>)
Append a Basic Block to the end of the function value.
Methods from Deref<Target = Value<'llvm>>
Trait Implementations
impl<'llvm> Copy for FnValue<'llvm>
Auto Trait Implementations
impl<'llvm> RefUnwindSafe for FnValue<'llvm>
impl<'llvm> !Send for FnValue<'llvm>
impl<'llvm> !Sync for FnValue<'llvm>
impl<'llvm> Unpin for FnValue<'llvm>
impl<'llvm> UnwindSafe for FnValue<'llvm>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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