ArrayType

public struct ArrayType: IRType

ArrayType is a very simple derived type that arranges elements sequentially in memory. ArrayType requires a size (number of elements) and an underlying data type.

  • The type of elements in this array.

    Declaration

    Swift

    public let elementType: IRType
  • The number of elements in this array.

    Declaration

    Swift

    public let count: Int
  • Creates an array type from an underlying element type and count.

    Declaration

    Swift

    public init(elementType: IRType, count: Int)
  • Creates a constant array value from a list of IR values of a common type.

    Declaration

    Swift

    public static func constant(_ values: [IRValue], type: IRType) -> IRValue

    Parameters

    values

    A list of IR values of the same type.

    type

    The type of the provided IR values.

    Return Value

    A constant array value containing the given values.

  • Retrieves the underlying LLVM type object.

    Declaration

    Swift

    public func asLLVM() -> LLVMTypeRef