ArrayType
public struct ArrayType : IRType
extension ArrayType: Equatable
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.
Note
The context of this type is taken from it’selementTypeDeclaration
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) -> IRConstantParameters
valuesA list of IR values of the same type.
typeThe type of the provided IR values.
Return Value
A constant array value containing the given values.
-
Creates a constant, null terminated array value of UTF-8 bytes from string’s
utf8member.Declaration
Swift
public static func constant(string: String, in context: Context = .global) -> IRConstantParameters
stringA string to create a null terminated array from.
contextThe context to create the string in.
Return Value
A null terminated constant array value containing
string.utf8.count + 1i8’s. -
Retrieves the underlying LLVM type object.
Declaration
Swift
public func asLLVM() -> LLVMTypeRef -
Declaration
Swift
public static func == (lhs: ArrayType, rhs: ArrayType) -> Bool
ArrayType Structure Reference