Struct llvm_ir::function::Function[][src]

pub struct Function {
    pub name: String,
    pub parameters: Vec<Parameter>,
    pub is_var_arg: bool,
    pub return_type: TypeRef,
    pub basic_blocks: Vec<BasicBlock>,
    pub function_attributes: Vec<FunctionAttribute>,
    pub return_attributes: Vec<ParameterAttribute>,
    pub linkage: Linkage,
    pub visibility: Visibility,
    pub dll_storage_class: DLLStorageClass,
    pub calling_convention: CallingConvention,
    pub section: Option<String>,
    pub comdat: Option<Comdat>,
    pub alignment: u32,
    pub garbage_collector_name: Option<String>,
    pub personality_function: Option<ConstantRef>,
    pub debugloc: Option<DebugLoc>,
}

See LLVM 12 docs on Functions

Fields

name: Stringparameters: Vec<Parameter>is_var_arg: boolreturn_type: TypeRefbasic_blocks: Vec<BasicBlock>function_attributes: Vec<FunctionAttribute>return_attributes: Vec<ParameterAttribute>linkage: Linkagevisibility: Visibilitydll_storage_class: DLLStorageClasscalling_convention: CallingConventionsection: Option<String>comdat: Option<Comdat>alignment: u32garbage_collector_name: Option<String>

See LLVM 12 docs on Garbage Collector Strategy Names

personality_function: Option<ConstantRef>

Personalities are used for exception handling. See LLVM 12 docs on Personality Function

debugloc: Option<DebugLoc>

Implementations

impl Function[src]

pub fn get_bb_by_name(&self, name: &Name) -> Option<&BasicBlock>[src]

Get the BasicBlock having the given Name (if any).

pub fn new(name: impl Into<String>) -> Self[src]

A Function instance as empty as possible, using defaults

Trait Implementations

impl Clone for Function[src]

impl Debug for Function[src]

impl HasDebugLoc for Function[src]

impl PartialEq<Function> for Function[src]

impl StructuralPartialEq for Function[src]

impl Typed for Function[src]

Auto Trait Implementations

impl RefUnwindSafe for Function[src]

impl Send for Function[src]

impl Sync for Function[src]

impl Unpin for Function[src]

impl UnwindSafe for Function[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.