Types
LLVM.LLVMType — Type
LLVMTypeAbstract supertype for all LLVM types.
LLVM.issized — Function
issized(typ::LLVMType)Return true if it makes sense to take the size of this type.
Note that this does not mean that it's possible to call sizeof on this type, as LLVM types sizes can only queried given a target data layout.
See also: sizeof(::DataLayout, ::LLVMType).
LLVM.context — Method
context(typ::LLVMType)Returns the context in which the given type was created.
Base.eltype — Method
eltype(typ::LLVMType)Get the element type of the given type, if supported.
Integer types
LLVM.IntegerType — Type
LLVM.IntegerType <: LLVMTypeType representing arbitrary bit width integers.
LLVM.IntType — Function
LLVM.IntType(bits::Integer)Create an integer type with the given bits width.
Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.
LLVM.width — Function
width(inttyp::LLVM.IntegerType)Get the bit width of the given integer type.
Floating-point types
LLVM.HalfType — Function
LLVM.HalfType()Create a 16-bit floating-point type.
LLVM.BFloatType — Function
LLVM.BFloatType()Create a 16-bit “brain” floating-point type.
LLVM.FloatType — Function
LLVM.FloatType()Create a 32-bit floating-point type.
LLVM.DoubleType — Function
LLVM.DoubleType()Create a 64-bit floating-point type.
LLVM.FP128Type — Function
LLVM.FP128Type()Create a 128-bit floating-point type, with a 113-bit significand.
LLVM.X86FP80Type — Function
LLVM.X86FP80Type()Create a 80-bit, X87 floating-point type.
LLVM.PPCFP128Type — Function
LLVM.PPCFP128Type()Create a 128-bit floating-point type, consisting of two 64-bits.
Function types
LLVM.FunctionType — Type
LLVM.FunctionType <: LLVMTypeA function type, representing a function signature.
LLVM.isvararg — Function
isvararg(ft::LLVM.FunctionType)Check whether the given function type is variadic.
LLVM.return_type — Function
return_type(ft::LLVM.FunctionType)Get the return type of the given function type.
LLVM.parameters — Method
parameters(ft::LLVM.FunctionType)Get the parameter types of the given function type.
Pointer types
LLVM.PointerType — Type
LLVM.PointerType <: LLVMTypeA pointer type.
LLVM.addrspace — Function
addrspace(ptrtyp::LLVM.PointerType)Get the address space of the given pointer type.
LLVM.is_opaque — Function
is_opaque(ptrtyp::LLVM.PointerType)Check whether the given pointer type is opaque.
Array types
LLVM.ArrayType — Type
LLVM.ArrayType <: LLVMTypeAn array type, representing a fixed-size array of identically-typed elements.
Base.length — Method
length(arrtyp::LLVM.ArrayType)Get the length of the given array type.
Base.isempty — Method
isempty(arrtyp::LLVM.ArrayType)Check whether the given array type is empty.
Vector types
LLVM.VectorType — Type
LLVM.VectorType <: LLVMTypeA vector type, representing a fixed-size vector of identically-typed elements. Typically used for SIMD operations.
Base.length — Method
length(vectyp::LLVM.VectorType)Get the length of the given vector type.
Structure types
LLVM.StructType — Type
LLVM.StructType <: LLVMTypeA structure type, representing a collection of named fields of potentially different types.
LLVM.ispacked — Function
ispacked(structtyp::LLVM.StructType)Check whether the given structure type is packed.
LLVM.isopaque — Function
isopaque(structtyp::LLVM.StructType)Check whether the given structure type is opaque.
LLVM.elements! — Function
elements!(structtyp::LLVM.StructType, elems::LLVMType[]; packed=false)Set the elements of the given structure type to elems. The packed argument indicates whether the structure should be packed, i.e., without padding between fields.
See also: elements.
LLVM.elements — Function
elements(structtyp::LLVM.StructType)Get the elements of the given structure type.
See also: elements!.
Other types
LLVM.VoidType — Type
LLVM.VoidType <: LLVMTypeA void type, representing the absence of a value.
LLVM.LabelType — Type
LLVM.LabelType <: LLVMTypeA label type, representing a code label.
LLVM.MetadataType — Type
LLVM.MetadataType <: LLVMTypeA metadata type, representing a metadata value.
LLVM.TokenType — Type
LLVM.TokenType <: LLVMTypeA token type, representing a token value.
Type iteration
LLVM.types — Function
types(ctx::LLVM.Context)Get a dictionary of all types in the given context.