llvm2py.ir.function module

class Function(value: Value, args: list[Value], blocks: list[Block], attributes: list[list[tuple]], calling_convention: int, is_vararg: bool, global_object: GlobalObject)

Bases: object

Function class

args: list[Value]

List of function arguments.

attrs: list[dict[str, tuple | tuple[Any] | tuple[Any, Any]]]

A list of function attributes. Each element references either the function itself, the return value, or one of the arguments.

For convenience, you can use functions from the support module to extract attributes.

blocks: dict[str, Block]

A dictionary that maps block names to their objects.

calling_convention: CallingConv

Function calling convention.

global_object: GlobalObject

Function as global object.

has_no_body()

Returns true if the function is only declared but not defined.

is_vararg: bool

If True, the function has a variable number of arguments. For example - @printf(ptr noundef, …).

value: Value

Function as value.