ConcreteTypeLayout

struct ConcreteTypeLayout : Sendable

The concrete layout of a type, describing the byte offsets of its stored properties.

  • The contiguous memory footprint of the type’s instances, in bytes.

    Declaration

    Swift

    let size: Int
  • The memory alignment of the type’s instances, in bytes.

    Declaration

    Swift

    let alignment: Int
  • The number of bytes from the start of one instance to the start of the next when stored in contiguous memory.

    Declaration

    Swift

    var stride: Int { get }
  • Undocumented

    Declaration

    Swift

    private func checkInvariant()
  • Creates an instance with the given properties.

    Declaration

    Swift

    init(size: Int, alignment: Int)
  • Creates the concrete form of the layout l of a type defined in ir, for use in m.

    Requires

    l.type is representable in LLVM.

    Declaration

    Swift

    init(_ l: AbstractTypeLayout, definedIn ir: IR.Program, forUseIn m: inout SwiftyLLVM.Module)
  • Creates the layout of t, which is defined in ir, for use in m.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    init(of t: AnyType, definedIn ir: IR.Program, forUseIn m: inout SwiftyLLVM.Module)
  • Creates the layout of t for use in m.

    Requires

    t is not .module.

    Declaration

    Swift

    init(of t: BuiltinType, forUseIn m: inout SwiftyLLVM.Module)