Struct llvm_kaleidoscope_rs::llvm::FnValue
source · pub struct FnValue<'llvm>(/* private fields */);
Expand description
Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.
Implementations§
source§impl<'llvm> FnValue<'llvm>
impl<'llvm> FnValue<'llvm>
sourcepub fn fn_type(&self) -> Type<'llvm>
pub fn fn_type(&self) -> Type<'llvm>
Get a type reference representing the function type (return + args) 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>>§
sourcepub fn type_of(&self) -> Type<'llvm>
pub fn type_of(&self) -> Type<'llvm>
Get a type reference representing for the given value reference.
Panics
Panics if LLVM API returns a null
pointer.
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§
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
Mutably borrows from an owned value. Read more