Program

extension IR.Program
  • Returns the name of f in LLVM IR.

    Declaration

    Swift

    func llvmName(of f: IR.Function.ID) -> String
  • Returns the LLVM form of t in module.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    func llvm<T>(_ t: T, in module: inout SwiftyLLVM.Module) -> SwiftyLLVM.IRType where T : TypeProtocol
  • Returns the LLVM form of t in module.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    func llvm(arrowType t: ArrowType, in module: inout SwiftyLLVM.Module) -> SwiftyLLVM.IRType
  • Returns the LLVM form of t in module.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    func llvm(bufferType t: BufferType, in module: inout SwiftyLLVM.Module) -> SwiftyLLVM.IRType
  • Returns the LLVM form of t in module.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    func llvm(builtinType t: BuiltinType, in module: inout SwiftyLLVM.Module) -> SwiftyLLVM.IRType
  • Returns the LLVM form of t in module.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    func llvm(
      boundGenericType t: BoundGenericType, in module: inout SwiftyLLVM.Module
    ) -> SwiftyLLVM.IRType
  • Returns the LLVM form of t in module.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    func llvm(productType t: ProductType, in module: inout SwiftyLLVM.Module) -> SwiftyLLVM.IRType
  • Returns the LLVM form of t in module.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    func llvm(tupleType t: TupleType, in module: inout SwiftyLLVM.Module) -> SwiftyLLVM.IRType
  • Rethrns the LLVM forms of fields in module.

    Declaration

    Swift

    private func llvm(
      fields: [TupleType.Element], in module: inout SwiftyLLVM.Module
    ) -> [SwiftyLLVM.IRType]
  • Returns the LLVM form of t in module.

    Requires

    t is representable in LLVM.

    Declaration

    Swift

    func llvm(unionType t: UnionType, in module: inout SwiftyLLVM.Module) -> SwiftyLLVM.IRType
  • Returns a LLVM struct named n and having the fields returned by fields, declaring it in module if it does not already exist.

    Declaration

    Swift

    private func demandStruct(
      named n: String, in module: inout SwiftyLLVM.Module,
      fields: (inout SwiftyLLVM.Module) -> [SwiftyLLVM.IRType]
    ) -> SwiftyLLVM.StructType