pub struct Function<'ctx> { /* private fields */ }
Expand description
Function is gccjit’s representation of a function. Functions are constructed by constructing basic blocks and connecting them together. Locals are declared at the function level.
Implementations§
source§impl<'ctx> Function<'ctx>
impl<'ctx> Function<'ctx>
pub fn get_param(&self, idx: i32) -> Parameter<'ctx>
pub fn get_param_count(&self) -> usize
pub fn get_return_type(&self) -> Type<'ctx>
pub fn get_address(&self, loc: Option<Location<'ctx>>) -> RValue<'ctx>
pub fn dump_to_dot<S: AsRef<str>>(&self, path: S)
pub fn new_block<S: AsRef<str>>(&self, name: S) -> Block<'ctx>
pub fn new_local<S: AsRef<str>>( &self, loc: Option<Location<'ctx>>, ty: Type<'ctx>, name: S ) -> LValue<'ctx>
Trait Implementations§
source§impl<'ctx> PartialEq for Function<'ctx>
impl<'ctx> PartialEq for Function<'ctx>
impl<'ctx> Copy for Function<'ctx>
impl<'ctx> Eq for Function<'ctx>
impl<'ctx> StructuralPartialEq for Function<'ctx>
Auto Trait Implementations§
impl<'ctx> RefUnwindSafe for Function<'ctx>
impl<'ctx> !Send for Function<'ctx>
impl<'ctx> !Sync for Function<'ctx>
impl<'ctx> Unpin for Function<'ctx>
impl<'ctx> UnwindSafe for Function<'ctx>
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