Wyvern.Function (wyvern v1.0.3)

Copy Markdown

The %Function{} represents a function defintion in the LLVM IR.

A function does not require an id because it has a global name.

Summary

Types

addr()

@type addr() :: nil | :unnamed_addr | :local_unnamed_addr

block_list()

@type block_list() :: [Wyvern.BasicBlock.t()]

cconv()

@type cconv() :: [nil | :fastcc | :coldcc | :tailcc | :swiftcc | :swifttailcc]

definition_linkage()

@type definition_linkage() ::
  nil
  | :private
  | :internal
  | :available_externally
  | :linkonce
  | :weak
  | :linkonce_odr
  | :weak_odr

param_list()

@type param_list() :: [Wyvern.Param.t()]

t()

@type t() :: %Wyvern.Function{
  addr: addr(),
  blocks: block_list(),
  cconv: cconv(),
  linkage: definition_linkage(),
  name: String.t(),
  params: param_list(),
  ret_type: Wyvern.Type.t(),
  visibility: visibility()
}

visibility()

@type visibility() :: nil | :default | :hidden | :protected

Functions

new(name, ret_type, params, blocks, opts \\ [])

@spec new(String.t(), Wyvern.Type.t(), param_list(), block_list(), keyword()) :: t()