pub struct Func<'a>(pub Value<'a>);
Expand description
Functions
Tuple Fields§
§0: Value<'a>
Implementations§
Source§impl<'a> Func<'a>
impl<'a> Func<'a>
Sourcepub fn param_count(self) -> usize
pub fn param_count(self) -> usize
Get the number of params
Sourcepub fn next_function(self) -> Result<Func<'a>, Error>
pub fn next_function(self) -> Result<Func<'a>, Error>
Get the next function
Sourcepub fn prev_function(self) -> Result<Func<'a>, Error>
pub fn prev_function(self) -> Result<Func<'a>, Error>
Get the previous function
Sourcepub fn has_personality_fn(self) -> bool
pub fn has_personality_fn(self) -> bool
Returns true when the value has a personality_fn
Sourcepub fn personality_fn(self) -> Result<Value<'a>, Error>
pub fn personality_fn(self) -> Result<Value<'a>, Error>
Returns the personality_fn
Sourcepub fn set_personality_fn(&mut self, f: impl AsRef<Value<'a>>)
pub fn set_personality_fn(&mut self, f: impl AsRef<Value<'a>>)
Set the personality_fn
Sourcepub fn set_call_conv(&mut self, conv: CallConv)
pub fn set_call_conv(&mut self, conv: CallConv)
Set calling convention
Sourcepub fn add_attribute(&mut self, index: AttributeIndex, attr: &Attribute<'a>)
pub fn add_attribute(&mut self, index: AttributeIndex, attr: &Attribute<'a>)
Set attribute
Sourcepub fn remove_enum_atribute(&mut self, index: AttributeIndex, kind_id: u32)
pub fn remove_enum_atribute(&mut self, index: AttributeIndex, kind_id: u32)
Remove an enum attribute
Sourcepub fn remove_string_atribute(
&mut self,
index: AttributeIndex,
k: impl AsRef<str>,
)
pub fn remove_string_atribute( &mut self, index: AttributeIndex, k: impl AsRef<str>, )
Remove a string attribute
Sourcepub fn attributes(self, index: usize) -> Vec<Attribute<'a>>
pub fn attributes(self, index: usize) -> Vec<Attribute<'a>>
Get all attributes
Sourcepub fn inline_asm_intel(
t: impl AsRef<Type<'a>>,
s: impl AsRef<str>,
constraints: impl AsRef<str>,
has_side_effects: bool,
is_align_stack: bool,
can_throw: bool,
) -> Result<Value<'a>, Error>
pub fn inline_asm_intel( t: impl AsRef<Type<'a>>, s: impl AsRef<str>, constraints: impl AsRef<str>, has_side_effects: bool, is_align_stack: bool, can_throw: bool, ) -> Result<Value<'a>, Error>
Create specified uniqued inline asm string (intel syntax)
Sourcepub fn inline_asm_att(
t: impl AsRef<Type<'a>>,
s: impl AsRef<str>,
constraints: impl AsRef<str>,
has_side_effects: bool,
is_align_stack: bool,
can_throw: bool,
) -> Result<Value<'a>, Error>
pub fn inline_asm_att( t: impl AsRef<Type<'a>>, s: impl AsRef<str>, constraints: impl AsRef<str>, has_side_effects: bool, is_align_stack: bool, can_throw: bool, ) -> Result<Value<'a>, Error>
Create specified uniqued inline asm string (att syntax)
Sourcepub fn set_alignment(&mut self, align: usize)
pub fn set_alignment(&mut self, align: usize)
Set value alignment
Sourcepub fn global_linkage(self) -> Linkage
pub fn global_linkage(self) -> Linkage
Get global linkage
Sourcepub fn set_global_linkage(&mut self, l: Linkage)
pub fn set_global_linkage(&mut self, l: Linkage)
Set global linkage
Sourcepub fn global_visibility(self) -> Visibility
pub fn global_visibility(self) -> Visibility
Get global visibility
Sourcepub fn set_global_visibility(&mut self, l: Visibility)
pub fn set_global_visibility(&mut self, l: Visibility)
Set global visibility
Sourcepub fn count_basic_blocks(self) -> usize
pub fn count_basic_blocks(self) -> usize
Count the number of basic blocks
Sourcepub fn basic_blocks(self) -> Vec<BasicBlock<'a>>
pub fn basic_blocks(self) -> Vec<BasicBlock<'a>>
Get a list of all basic blocks
Sourcepub fn first_basic_block(self) -> Result<BasicBlock<'a>, Error>
pub fn first_basic_block(self) -> Result<BasicBlock<'a>, Error>
Get first basic block
Sourcepub fn last_basic_block(self) -> Result<BasicBlock<'a>, Error>
pub fn last_basic_block(self) -> Result<BasicBlock<'a>, Error>
Get last basic block
Sourcepub fn entry_basic_block(self) -> Result<BasicBlock<'a>, Error>
pub fn entry_basic_block(self) -> Result<BasicBlock<'a>, Error>
Get entry block
Sourcepub fn append_basic_block(self, bb: BasicBlock<'a>)
pub fn append_basic_block(self, bb: BasicBlock<'a>)
Append a new block
Trait Implementations§
impl<'a> Copy for Func<'a>
Auto Trait Implementations§
impl<'a> Freeze for Func<'a>
impl<'a> RefUnwindSafe for Func<'a>
impl<'a> !Send for Func<'a>
impl<'a> !Sync for Func<'a>
impl<'a> Unpin for Func<'a>
impl<'a> UnwindSafe for Func<'a>
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