4.5. Value references

A value reference is a wrapper around a LLVM value for you to inspect. You can’t create one yourself; instead, you’ll get them from methods of the ModuleRef class.

4.5.1. Enumerations

class llvmlite.binding.Linkage

The different linkage types allowed for global values. The following values are provided:

external
available_externally
linkonce_any
linkonce_odr
linkonce_odr_autohide
weak_any
weak_odr
appending
internal
private
dllimport
dllexport
external_weak
ghost
common
linker_private
linker_private_weak
class llvmlite.binding.Visibility

The different visibility styles allowed for global values. The following values are provided:

default
hidden
protected
class llvmlite.binding.StorageClass

The different storage classes allowed for global values. The following values are provided:

default
dllimport
dllexport

4.5.2. The ValueRef class

class llvmlite.binding.ValueRef

A wrapper around a LLVM value. The following properties are available:

is_declaration

True if the global value is a mere declaration, False if it is defined in the given module.

linkage

The linkage type (a Linkage instance) for this value. This attribute is settable.

module

The module (a ModuleRef instance) this value is defined in.

name

This value’s name, as a string. This attribute is settable.

type

This value’s LLVM type. An opaque object is returned. It can be used with e.g. TargetData.get_abi_size().

storage_class

The storage class (a StorageClass instance) for this value. This attribute is settable.

visibility

The visibility style (a Visibility instance) for this value. This attribute is settable.