Struct llvm_rs::value::Function

source ·
pub struct Function(_);
Expand description

A function is a kind of value that can be called and contains blocks of code.

To get the value of each argument to a function, you can use the index operator. For example, &func[0] is the value that represents the first argument to the function.

Implementations§

Add a basic block with the name given to the function and return it.

Iterate through this function’s basic blocks.

source

pub fn get_entry(&self) -> Option<&BasicBlock>

Returns the entry block of this function or None if there is none.

Returns the function signature representing this function’s signature.

Methods from Deref<Target = GlobalValue>§

Set the linkage type for this global

Returns the linkage type for this global

Returns true if this global is a declaration (as opposed to a definition).

Methods from Deref<Target = Value>§

Returns the name of this value, or None if it lacks a name

Sets the name of this value

Returns the type of this value

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Returns a reference to the context that owns this value. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Which kind of iterator are we turning this into?
The type of the elements being iterated over.
Creates an iterator from a value. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Check if the given super value is an instance of this type.
Attempt to cast the given super value into an instance of this type.
Cast this value to a super value.
Check if the given super value is an instance of this type.
Attempt to cast the given super value into an instance of this type.
Cast this value to a super value.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.