FunctionType
public struct FunctionType : IRType
extension FunctionType: Equatable
FunctionType represents a function’s type signature. It consists of a
return type and a list of formal parameter types. The return type of a
function type is a void type or first class type — except for LabelType
and MetadataType.
-
The list of argument types.
Declaration
Swift
public let parameterTypes: [IRType] -
The return type of this function type.
Declaration
Swift
public let returnType: IRType -
Returns whether this function is variadic.
Declaration
Swift
public let isVariadic: Bool -
Creates a function type with the given argument types and return type.
Note
The context of this type is taken from it’sreturnTypeDeclaration
Parameters
argTypesA list of the argument types of the function type.
returnTypeThe return type of the function type.
isVarArgIndicates whether this function type is variadic. Defaults to
false. -
Creates a function type with the given argument types and return type.
Note
The context of this type is taken from it’sreturnTypeDeclaration
Parameters
parameterTypesA list of the argument types of the function type.
returnTypeThe return type of the function type.
variadicIndicates whether this function type is variadic. Defaults to
false. -
Retrieves the underlying LLVM type object.
Declaration
Swift
public func asLLVM() -> LLVMTypeRef
-
The list of argument types.
Declaration
Swift
@available(*, deprecated, message: "Use FunctionType.parameterTypes instead") public var argTypes: [IRType] { get } -
Returns whether this function is variadic.
Declaration
Swift
@available(*, deprecated, message: "Use FunctionType.isVariadic instead") public var isVarArg: Bool { get } -
Declaration
Swift
public static func == (lhs: FunctionType, rhs: FunctionType) -> Bool
FunctionType Structure Reference