Target

public class Target

A Target object represents an object that encapsulates information about a host architecture, vendor, ABI, etc.

  • Creates a Target object from an LLVM target object.

    Declaration

    Swift

    public init(llvm: LLVMTargetRef)
  • Returns true if this target supports just-in-time compilation.

    Attempting to create a JIT for a Target where this predicate is false may lead to program instability or corruption.

    Declaration

    Swift

    public var hasJIT: Bool { get }
  • Returns true if this target has a TargetMachine associated with it.

    Target machines are registered by the corresponding initializer functions for each target. LLVMSwift will ensure that these functions are invoked when a TargetMachine is created, but not before.

    Declaration

    Swift

    public var hasTargetMachine: Bool { get }
  • Returns true if this target has an ASM backend.

    ASM backends are registered by the corresponding iniailizer functions for each target. LLVMSwift will ensure that these functions are invoked when a TargetMachine is created, but not before.

    Declaration

    Swift

    public var hasASMBackend: Bool { get }
  • The name of this target.

    Declaration

    Swift

    public var name: String { get }
  • The description of this target.

    Declaration

    Swift

    public var targetDescription: String { get }
  • Returns a sequence of all targets in the global list of targets.

    Declaration

    Swift

    public static var allTargets: AnySequence<Target> { get }
  • Returns the first target in the global target list, if it exists.

    Declaration

    Swift

    public static var firstTarget: Target? { get }
  • Returns the target following this target in the global target list, if it exists.

    Declaration

    Swift

    public func next() -> Target?