diff --git a/docs/Classes.html b/docs/Classes.html index f817bb9e..e7708f02 100644 --- a/docs/Classes.html +++ b/docs/Classes.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -437,11 +469,11 @@

Declaration

provides simple methods for reading files and standard input into a memory buffer. In addition to basic access to the characters in the file, this interface guarantees you can read one character past the end of the file, -and that this character will read as ’\0’.

+and that this character will read as ‘\0’.

-

The ’\0’ guarantee is needed to support an optimization – it’s intended to +

The ‘\0’ guarantee is needed to support an optimization – it’s intended to be more efficient for clients which are reading all the data to stop -reading when they encounter a ’\0’ than to continually check the file +reading when they encounter a ‘\0’ than to continually check the file position to see if it has reached the end of the file.

See more @@ -593,7 +625,7 @@

Declaration

diff --git a/docs/Classes/Context.html b/docs/Classes/Context.html index 88c3fe81..020ab528 100644 --- a/docs/Classes/Context.html +++ b/docs/Classes/Context.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -321,7 +353,7 @@

Declaration

diff --git a/docs/Classes/Function.html b/docs/Classes/Function.html index 5557354e..be3451ab 100644 --- a/docs/Classes/Function.html +++ b/docs/Classes/Function.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -264,6 +296,33 @@

Function

diff --git a/docs/Classes/FunctionPassManager.html b/docs/Classes/FunctionPassManager.html index bb28695d..eb6354e6 100644 --- a/docs/Classes/FunctionPassManager.html +++ b/docs/Classes/FunctionPassManager.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -390,7 +422,7 @@

Parameters

diff --git a/docs/Classes/IRBuilder.html b/docs/Classes/IRBuilder.html index 51fbb374..955f4f16 100644 --- a/docs/Classes/IRBuilder.html +++ b/docs/Classes/IRBuilder.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -1255,7 +1287,7 @@

Parameters

- lhs + rhs @@ -1351,7 +1383,7 @@

Parameters

- lhs + rhs @@ -4549,9 +4581,9 @@

Global Variable Instructions

  • - - - addGlobal(_:type:) + + + addGlobal(_:type:addressSpace:)
    @@ -4566,7 +4598,7 @@

    Global Variable Instructions

    Declaration

    Swift

    -
    public func addGlobal(_ name: String, type: IRType) -> Global
    +
    public func addGlobal(_ name: String, type: IRType, addressSpace: Int? = nil) -> Global
    @@ -4600,6 +4632,19 @@

    Parameters

    + + + + addressSpace + + + +
    +

    The optional address space where the global variable resides.

    + +
    + + @@ -4896,7 +4941,7 @@

    Return Value

    diff --git a/docs/Classes/JIT.html b/docs/Classes/JIT.html index 249cf5b3..0a349b48 100644 --- a/docs/Classes/JIT.html +++ b/docs/Classes/JIT.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -282,11 +314,17 @@

    JIT

    provided Module to the architecture of the provided TargetMachine, and execute it.

    +

  • parameters:

    + +

  • Throws

    - JITError + JITError

    -
    +

    @@ -350,6 +388,15 @@

    Parameters

    it to machine code for the target architecture used to initialize this JIT.

    + +

    Declaration

    @@ -400,6 +447,144 @@

    Return Value

    +
  • +
    + + + + addressOfFunction(name:) + +
    +
    +
    +
    +
    +
    +

    Retrieves a pointer to the function compiled by this JIT. +- parameter name: The name of the function you wish to look up. +- returns: A pointer to the result of compiling the specified function. +- note: You will have to unsafeBitCast this pointer to + the appropriate @convention(c) function type to be + able to run it from Swift.

    + +
    typealias FnPtr = @convention(c) () -> Double
    +let fnAddr = jit.addressOfFunction(name: "test")
    +let fn = unsafeBitCast(fnAddr, to: FnPtr.self)
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func addressOfFunction(name: String) -> OpaquePointer?
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + name + + +
    +

    The name of the function you wish to look up.

    + +
    +
    +
    +
    +

    Return Value

    +

    A pointer to the result of compiling the specified function.

    + +
    +
    +
    +
  • +
  • +
    + + + + addModule(_:) + +
    +
    +
    +
    +
    +
    +

    Adds the provided module, and all top-level declarations into this JIT. +- parameter module: The module you wish to add.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func addModule(_ module: Module)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + module + + +
    +

    The module you wish to add.

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + removeModule(_:) + +
    +
    +
    +
    +
    +
    +

    Removes the provided module, and all top-level declarations, from this +JIT.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func removeModule(_ module: Module) throws
    + +
    +
    +
    +
    +
  • @@ -417,6 +602,15 @@

    Return Value

    executable. It takes an array of argument strings and passes them into the function as argc and argv.

    +
      +
    • parameters: + +
        +
      • function: The main function you wish to execute
      • +
      • args: The string arguments you wish to pass to the function
      • +
    • +
    +

    Declaration

    @@ -472,7 +666,7 @@

    Return Value

    diff --git a/docs/Classes/MemoryBuffer.html b/docs/Classes/MemoryBuffer.html index 8e678100..47291f1b 100644 --- a/docs/Classes/MemoryBuffer.html +++ b/docs/Classes/MemoryBuffer.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -260,11 +292,11 @@

    MemoryBuffer

    provides simple methods for reading files and standard input into a memory buffer. In addition to basic access to the characters in the file, this interface guarantees you can read one character past the end of the file, -and that this character will read as ’\0’.

    +and that this character will read as ‘\0’.

    -

    The ’\0’ guarantee is needed to support an optimization – it’s intended to +

    The ‘\0’ guarantee is needed to support an optimization – it’s intended to be more efficient for clients which are reading all the data to stop -reading when they encounter a ’\0’ than to continually check the file +reading when they encounter a ‘\0’ than to continually check the file position to see if it has reached the end of the file.

    @@ -316,6 +348,18 @@

    Declaration

    Creates a MemoryBuffer that points to a specified UnsafeBufferPointer.

    + +

    Declaration

    @@ -392,6 +436,15 @@

    Parameters

    Creates a MemoryBuffer by copying the data within a specified UnsafeBufferPointer.

    +
      +
    • parameters: + +
        +
      • buffer: The underlying buffer that contains the data.
      • +
      • name: The name for the new memory buffer.
      • +
    • +
    +

    Declaration

    @@ -579,7 +632,7 @@

    Declaration

    diff --git a/docs/Classes/Module.html b/docs/Classes/Module.html index 9579a998..8b10d651 100644 --- a/docs/Classes/Module.html +++ b/docs/Classes/Module.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -378,6 +410,33 @@

    Declaration

    +
  • +
    + + + + name + +
    +
    +
    +
    +
    +
    +

    The identifier of this module.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var name: String
    + +
    +
    +
    +
    +
  • @@ -892,7 +951,7 @@

    Return Value

    diff --git a/docs/Classes/Target.html b/docs/Classes/Target.html index 8499f982..971616b1 100644 --- a/docs/Classes/Target.html +++ b/docs/Classes/Target.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -295,7 +327,7 @@

    Declaration

    diff --git a/docs/Classes/TargetData.html b/docs/Classes/TargetData.html index a9e0c8cd..d2e7329d 100644 --- a/docs/Classes/TargetData.html +++ b/docs/Classes/TargetData.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -997,7 +1029,7 @@

    Return Value

    diff --git a/docs/Classes/TargetMachine.html b/docs/Classes/TargetMachine.html index 5a080cb5..0070dcbc 100644 --- a/docs/Classes/TargetMachine.html +++ b/docs/Classes/TargetMachine.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -616,7 +648,7 @@

    Parameters

    diff --git a/docs/Enums.html b/docs/Enums.html index 11d024b1..8a34307b 100644 --- a/docs/Enums.html +++ b/docs/Enums.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -253,6 +285,91 @@

    Enums

    +
    +
      +
    • +
      + + + + Unsigned + +
      +
      +
      +
      +
      +
      +

      Represents unsigned integral types and operations.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public enum Unsigned: IntegralConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    • +
      + + + + Signed + +
      +
      +
      +
      +
      +
      +

      Represents signed integral types and operations.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public enum Signed: IntegralConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    • +
      + + + + Floating + +
      +
      +
      +
      +
      +
      +

      Represents floating types and operations.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public enum Floating: ConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    +
    • @@ -286,6 +403,41 @@

      Declaration

    +
    +
      +
    • +
      + + + + CallingConvention + +
      +
      +
      +
      +
      +
      +

      Enumerates the calling conventions supported by LLVM.

      + +

      The raw values of this enumeration must match those in +llvm-c/Core.h

      + + See more +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public enum CallingConvention: UInt32
      + +
      +
      +
      +
      +
    • +
    +
    • @@ -856,7 +1008,7 @@

      Declaration

    diff --git a/docs/Enums/AtomicOrdering.html b/docs/Enums/AtomicOrdering.html index 6bee37c0..0fa4ce3c 100644 --- a/docs/Enums/AtomicOrdering.html +++ b/docs/Enums/AtomicOrdering.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -705,7 +737,7 @@

    Declaration

    diff --git a/docs/Enums/AtomicReadModifyWriteOperation.html b/docs/Enums/AtomicReadModifyWriteOperation.html index 23610b07..42f7c3e9 100644 --- a/docs/Enums/AtomicReadModifyWriteOperation.html +++ b/docs/Enums/AtomicReadModifyWriteOperation.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -677,7 +709,7 @@

    Declaration

    diff --git a/docs/Enums/ByteOrder.html b/docs/Enums/ByteOrder.html index e037b60c..0a8e1679 100644 --- a/docs/Enums/ByteOrder.html +++ b/docs/Enums/ByteOrder.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -339,7 +371,7 @@

    Declaration

    diff --git a/docs/Enums/CallingConvention.html b/docs/Enums/CallingConvention.html new file mode 100644 index 00000000..498a5056 --- /dev/null +++ b/docs/Enums/CallingConvention.html @@ -0,0 +1,536 @@ + + + + CallingConvention Enum Reference + + + + + + + + + + +
    +
    +

    Docs (100% documented)

    +
    +
    +
    + +
    +
    + +
    +
    +
    +

    CallingConvention

    +
    +
    +
    public enum CallingConvention: UInt32
    + +
    +
    +

    Enumerates the calling conventions supported by LLVM.

    + +

    The raw values of this enumeration must match those in +llvm-c/Core.h

    + +
    +
    +
    +
      +
    • +
      + + + + c + +
      +
      +
      +
      +
      +
      +

      The default LLVM calling convention, compatible with C.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case c = 0
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + fast + +
      +
      +
      +
      +
      +
      +

      This calling convention attempts to make calls as fast as possible +(e.g. by passing things in registers).

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case fast = 8
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + cold + +
      +
      +
      +
      +
      +
      +

      This calling convention attempts to make code in the caller as efficient +as possible under the assumption that the call is not commonly executed.
      +As such, these calls often preserve all registers so that the call does +not break any live ranges in the caller side.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case cold = 9
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + webKitJS + +
      +
      +
      +
      +
      +
      +

      Calling convention for stack based JavaScript calls.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case webKitJS = 12
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + anyReg + +
      +
      +
      +
      +
      +
      +

      Calling convention for dynamic register based calls +(e.g. stackmap and patchpoint intrinsics).

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case anyReg = 13
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + x86Stdcall + +
      +
      +
      +
      +
      +
      +

      The calling conventions mostly used by the Win32 API.

      + +

      It is basically the same as the C convention with the difference in that +the callee is responsible for popping the arguments from the stack.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case x86Stdcall = 64
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + x86Fastcall + +
      +
      +
      +
      +
      +
      +

      Fast analog of x86Stdcall.

      + +

      Passes first two arguments in ECX:EDX registers, others via the stack. +The callee is responsible for stack cleaning.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case x86Fastcall = 65
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + + + diff --git a/docs/Enums/CodeGenOptLevel.html b/docs/Enums/CodeGenOptLevel.html index 15c9ae0c..dab24d19 100644 --- a/docs/Enums/CodeGenOptLevel.html +++ b/docs/Enums/CodeGenOptLevel.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -464,7 +496,7 @@

    Declaration

    diff --git a/docs/Enums/CodeModel.html b/docs/Enums/CodeModel.html index d0e8c98b..4a5ecff1 100644 --- a/docs/Enums/CodeModel.html +++ b/docs/Enums/CodeModel.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -533,7 +565,7 @@

    Declaration

    diff --git a/docs/Enums/CodegenFileType.html b/docs/Enums/CodegenFileType.html index 252a22f8..a16d004b 100644 --- a/docs/Enums/CodegenFileType.html +++ b/docs/Enums/CodegenFileType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -388,7 +420,7 @@

    Declaration

    diff --git a/docs/Enums/FloatType.html b/docs/Enums/FloatType.html index 130aaa1c..5138994b 100644 --- a/docs/Enums/FloatType.html +++ b/docs/Enums/FloatType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -452,9 +484,9 @@

    Declaration

  • - + - constant(_:) + constant(_:)
    @@ -469,7 +501,7 @@

    Declaration

    Declaration

    Swift

    -
    public func constant(_ value: Double) -> IRValue
    +
    public func constant(_ value: Double) -> Constant<Floating>
    @@ -508,7 +540,7 @@

    Declaration

    diff --git a/docs/Enums/FunctionPass.html b/docs/Enums/FunctionPass.html index 04753d49..171607f7 100644 --- a/docs/Enums/FunctionPass.html +++ b/docs/Enums/FunctionPass.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -1873,7 +1905,7 @@

    Declaration

    diff --git a/docs/Enums/IntPredicate.html b/docs/Enums/IntPredicate.html index 914bd27d..7beca97b 100644 --- a/docs/Enums/IntPredicate.html +++ b/docs/Enums/IntPredicate.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -614,7 +646,7 @@

    Declaration

    diff --git a/docs/Enums/JITError.html b/docs/Enums/JITError.html index 0c683b55..c9bc7223 100644 --- a/docs/Enums/JITError.html +++ b/docs/Enums/JITError.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,6 +325,38 @@

    Declaration

    +
    +
      +
    • +
      + + + + couldNotRemoveModule + +
      +
      +
      +
      +
      +
      +

      The JIT was unable to remove the provided module. A message is provided +explaining the failure

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case couldNotRemoveModule(Module, String)
      + +
      +
      +
      +
      +
    • +
    +
    + + @@ -713,7 +745,7 @@

    Declaration

    diff --git a/docs/Enums/MemoryBufferError.html b/docs/Enums/MemoryBufferError.html index 7e9289e6..6acf31d4 100644 --- a/docs/Enums/MemoryBufferError.html +++ b/docs/Enums/MemoryBufferError.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -295,7 +327,7 @@

    Declaration

    diff --git a/docs/Enums/ModuleError.html b/docs/Enums/ModuleError.html index 17f903d1..c3dc1d9b 100644 --- a/docs/Enums/ModuleError.html +++ b/docs/Enums/ModuleError.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -392,7 +424,7 @@

    Declaration

    diff --git a/docs/Enums/OpCode.html b/docs/Enums/OpCode.html index 01611ba8..d29198dc 100644 --- a/docs/Enums/OpCode.html +++ b/docs/Enums/OpCode.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -2250,7 +2282,7 @@

    Declaration

    diff --git a/docs/Enums/OverflowBehavior.html b/docs/Enums/OverflowBehavior.html index 878fe88a..44fbff49 100644 --- a/docs/Enums/OverflowBehavior.html +++ b/docs/Enums/OverflowBehavior.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -360,7 +392,7 @@

    Declaration

    diff --git a/docs/Enums/RealPredicate.html b/docs/Enums/RealPredicate.html index d91ddd2a..eb89e1c5 100644 --- a/docs/Enums/RealPredicate.html +++ b/docs/Enums/RealPredicate.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -790,7 +822,7 @@

    Declaration

    diff --git a/docs/Enums/RelocMode.html b/docs/Enums/RelocMode.html index f9872677..7174e271 100644 --- a/docs/Enums/RelocMode.html +++ b/docs/Enums/RelocMode.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -420,7 +452,7 @@

    Declaration

    diff --git a/docs/Enums/TargetMachineError.html b/docs/Enums/TargetMachineError.html index ca733363..f1a49149 100644 --- a/docs/Enums/TargetMachineError.html +++ b/docs/Enums/TargetMachineError.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -424,7 +456,7 @@

    Declaration

    diff --git a/docs/Enums/Visibility.html b/docs/Enums/Visibility.html index d639a23a..88b78670 100644 --- a/docs/Enums/Visibility.html +++ b/docs/Enums/Visibility.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -398,7 +430,7 @@

    Declaration

    diff --git a/docs/Extensions.html b/docs/Extensions.html index 0f5b40d5..619cda04 100644 --- a/docs/Extensions.html +++ b/docs/Extensions.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -611,7 +643,7 @@

    Declaration

    diff --git a/docs/Extensions/Bool.html b/docs/Extensions/Bool.html index 3f6ba580..cceab153 100644 --- a/docs/Extensions/Bool.html +++ b/docs/Extensions/Bool.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/Int.html b/docs/Extensions/Int.html index 85f1c930..7e4b6030 100644 --- a/docs/Extensions/Int.html +++ b/docs/Extensions/Int.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/Int16.html b/docs/Extensions/Int16.html index 98161eb5..eb35b6d8 100644 --- a/docs/Extensions/Int16.html +++ b/docs/Extensions/Int16.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/Int32.html b/docs/Extensions/Int32.html index 3fd59143..c76aa0b0 100644 --- a/docs/Extensions/Int32.html +++ b/docs/Extensions/Int32.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/Int64.html b/docs/Extensions/Int64.html index 42fc6c76..ede673ae 100644 --- a/docs/Extensions/Int64.html +++ b/docs/Extensions/Int64.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/Int8.html b/docs/Extensions/Int8.html index ccadf144..133d6992 100644 --- a/docs/Extensions/Int8.html +++ b/docs/Extensions/Int8.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/LLVMValueRef.html b/docs/Extensions/LLVMValueRef.html index 1414a050..c3e1eb73 100644 --- a/docs/Extensions/LLVMValueRef.html +++ b/docs/Extensions/LLVMValueRef.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/String.html b/docs/Extensions/String.html index 73a87764..eafc7071 100644 --- a/docs/Extensions/String.html +++ b/docs/Extensions/String.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/UInt.html b/docs/Extensions/UInt.html index c9889393..5049c50c 100644 --- a/docs/Extensions/UInt.html +++ b/docs/Extensions/UInt.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/UInt16.html b/docs/Extensions/UInt16.html index 7ee29190..39fe7e24 100644 --- a/docs/Extensions/UInt16.html +++ b/docs/Extensions/UInt16.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/UInt32.html b/docs/Extensions/UInt32.html index 64d271ff..0ceb3e24 100644 --- a/docs/Extensions/UInt32.html +++ b/docs/Extensions/UInt32.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/UInt64.html b/docs/Extensions/UInt64.html index f348badb..5fc8c224 100644 --- a/docs/Extensions/UInt64.html +++ b/docs/Extensions/UInt64.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Extensions/UInt8.html b/docs/Extensions/UInt8.html index 12a05abe..1a1ebfb1 100644 --- a/docs/Extensions/UInt8.html +++ b/docs/Extensions/UInt8.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/Functions.html b/docs/Functions.html new file mode 100644 index 00000000..5abe2cec --- /dev/null +++ b/docs/Functions.html @@ -0,0 +1,413 @@ + + + + Functions Reference + + + + + + + + + +
    +
    +

    Docs (100% documented)

    +
    +
    +
    + +
    +
    + +
    +
    +
    +

    Functions

    +

    The following functions are available globally.

    + +
    +
    +
    + +
      +
    • +
      + + + + -(_:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant negate operation to negate an integral value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public prefix func -(lhs: Constant<Signed>) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + lhs + + +
      +

      The operand to negate.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the negation of the given constant.

      + +
      +
      +
      +
    • +
    • +
      + + + + -(_:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant negate operation to negate a floating value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public prefix func -(lhs: Constant<Floating>) -> Constant<Floating>
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + lhs + + +
      +

      The operand to negate.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the negation of the given constant.

      + +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + +
    + diff --git a/docs/Protocols.html b/docs/Protocols.html index 9ba13ff2..b106afe3 100644 --- a/docs/Protocols.html +++ b/docs/Protocols.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -253,6 +285,64 @@

    Protocols

    +
    +
      +
    • + +
      +
      +
      +
      +
      +

      A protocol to which the phantom types for a constant’s representation conform.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public protocol ConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      A protocol to which the phantom types for integral constants conform.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public protocol IntegralConstantRepresentation: ConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    +
    • @@ -355,7 +445,7 @@

      Declaration

    diff --git a/docs/Protocols/IRGlobal.html b/docs/Protocols/IRGlobal.html index 1d9c7b2b..31392e6f 100644 --- a/docs/Protocols/IRGlobal.html +++ b/docs/Protocols/IRGlobal.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -328,7 +360,7 @@

    Declaration

    diff --git a/docs/Protocols/IRType.html b/docs/Protocols/IRType.html index ccd43edf..1e9a7b66 100644 --- a/docs/Protocols/IRType.html +++ b/docs/Protocols/IRType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -424,7 +456,7 @@

    Declaration

    diff --git a/docs/Protocols/IRValue.html b/docs/Protocols/IRValue.html index 0c3a8e72..eec56fd3 100644 --- a/docs/Protocols/IRValue.html +++ b/docs/Protocols/IRValue.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -430,7 +462,7 @@

    Declaration

    -

    Whether or not the underlying LLVM value is a Constant

    +

    Whether or not the underlying LLVM value is a Constant

    @@ -2933,7 +2965,7 @@

    Declaration

    diff --git a/docs/Structs.html b/docs/Structs.html index d11e980c..08f2ce51 100644 --- a/docs/Structs.html +++ b/docs/Structs.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -364,6 +396,53 @@

    Declaration

    +
    + +
      +
    • +
      + + + + Constant + +
      +
      +
      +
      +
      +
      +

      A Constant represents a value initialized to a constant. Constant values +may be manipulated with standard Swift arithmetic operations and used with +standard IR Builder instructions like any other operand. The difference +being any instructions acting solely on constants and any arithmetic +performed on constants is evaluated at compile-time only.

      + +

      Constants keep track of the values they represent at the type level to +disallow mixed-type arithmetic. Use the cast family of operations to +safely convert constants to other representations.

      + + See more +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public struct Constant<Repr: ConstantRepresentation>: IRValue
      + +
      +
      +
      +
      +
    • +
    +
    + + @@ -295,7 +327,7 @@

    Declaration

    diff --git a/docs/Structs/ArrayType.html b/docs/Structs/ArrayType.html index 2eca9f0e..bf483d64 100644 --- a/docs/Structs/ArrayType.html +++ b/docs/Structs/ArrayType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -442,7 +474,7 @@

    Declaration

    diff --git a/docs/Structs/BasicBlock.html b/docs/Structs/BasicBlock.html index 4d3467b3..493b1285 100644 --- a/docs/Structs/BasicBlock.html +++ b/docs/Structs/BasicBlock.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -579,7 +611,7 @@

    Declaration

    diff --git a/docs/Structs/Constant.html b/docs/Structs/Constant.html new file mode 100644 index 00000000..6306092e --- /dev/null +++ b/docs/Structs/Constant.html @@ -0,0 +1,1716 @@ + + + + Constant Struct Reference + + + + + + + + + + +
    +
    +

    Docs (100% documented)

    +
    +
    +
    + +
    +
    + +
    +
    +
    +

    Constant

    +
    +
    +
    public struct Constant<Repr: ConstantRepresentation>: IRValue
    + +
    +
    +

    A Constant represents a value initialized to a constant. Constant values +may be manipulated with standard Swift arithmetic operations and used with +standard IR Builder instructions like any other operand. The difference +being any instructions acting solely on constants and any arithmetic +performed on constants is evaluated at compile-time only.

    + +

    Constants keep track of the values they represent at the type level to +disallow mixed-type arithmetic. Use the cast family of operations to +safely convert constants to other representations.

    + +
    +
    +
    +
      +
    • +
      + + + + asLLVM() + +
      +
      +
      +
      +
      +
      +

      Retrieves the underlying LLVM constant object.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func asLLVM() -> LLVMValueRef
      + +
      +
      +
      +
      +
    • +
    +
    +
    + +
      +
    • +
      + + + + cast(to:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant cast to a given integral type.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func cast<T: IntegralConstantRepresentation>(to type: IntType) -> Constant<T>
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + type + + +
      +

      The type to cast towards.

      + +
      +
      +
      +
      +

      Return Value

      +

      A const value representing this value cast to the given integral type.

      + +
      +
      +
      +
    • +
    • +
      + + + + cast(to:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant cast to a given floating type.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func cast(to type: FloatType) -> Constant<Floating>
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + type + + +
      +

      The type to cast towards.

      + +
      +
      +
      +
      +

      Return Value

      +

      A const value representing this value cast to the given floating type.

      + +
      +
      +
      +
    • +
    +
    +
    + +
      +
    • + +
      +
      +
      +
      +
      +

      Creates a constant negate operation to negate a value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func negate(_ lhs: Constant<Signed>, overflowBehavior: OverflowBehavior = .default) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The operand to negate.

      + +
      +
      + + overflowBehavior + + +
      +

      Should overflow occur, specifies the behavior of the resulting constant value.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the negation of the given constant.

      + +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      Creates a constant add operation to add two homogenous constants together.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func add(_ lhs: Constant, _ rhs: Constant, overflowBehavior: OverflowBehavior = .default) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first summand value (the augend).

      + +
      +
      + + rhs + + +
      +

      The second summand value (the addend).

      + +
      +
      + + overflowBehavior + + +
      +

      Should overflow occur, specifies the behavior of the resulting constant value.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the sum of the two operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + +(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant add operation to add two homogenous constants together.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func +(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first summand value (the augend).

      + +
      +
      + + rhs + + +
      +

      The second summand value (the addend).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the sum of the two operands.

      + +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      Creates a constant sub operation to subtract two homogenous constants.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func subtract(_ lhs: Constant, _ rhs: Constant, overflowBehavior: OverflowBehavior = .default) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value (the minuend).

      + +
      +
      + + rhs + + +
      +

      The second value (the subtrahend).

      + +
      +
      + + overflowBehavior + + +
      +

      Should overflow occur, specifies the behavior of the resulting constant value.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the difference of the two operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + -(_:_:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant sub operation to subtract two homogenous constants.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func -(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value (the minuend).

      + +
      +
      + + rhs + + +
      +

      The second value (the subtrahend).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the difference of the two operands.

      + +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      Creates a constant multiply operation with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func multiply(_ lhs: Constant, _ rhs: Constant, overflowBehavior: OverflowBehavior = .default) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first factor value (the multiplier).

      + +
      +
      + + rhs + + +
      +

      The second factor value (the multiplicand).

      + +
      +
      + + overflowBehavior + + +
      +

      Should overflow occur, specifies the behavior of the resulting constant value.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the product of the two operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + *(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant multiply operation with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func *(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first factor value (the multiplier).

      + +
      +
      + + rhs + + +
      +

      The second factor value (the multiplicand).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the product of the two operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + /(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant divide operation that provides the remainder after divison of +the first value by the second value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func /(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value (the dividend).

      + +
      +
      + + rhs + + +
      +

      The second value (the divisor).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the quotient of the first and second operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + %(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant remainder operation that provides the remainder after divison +of the first value by the second value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func %(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value (the dividend).

      + +
      +
      + + rhs + + +
      +

      The second value (the divisor).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the remainder of division of the first operand by the second operand.

      + +
      +
      +
      +
    • +
    +
    +
    + +
      +
    • +
      + + + + ==(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant equality comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func ==(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + <(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant less-than comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func <(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + >(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant greater-than comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func >(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + <=(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant less-than-or-equal comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func <=(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + >=(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant greater-than-or-equal comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func >=(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    +
    +
    + +
      +
    • +
      + + + + !(_:) + +
      +
      +
      +
      +
      +
      +

      A constant bitwise logical not with the given integral value as an operand.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static prefix func !(lhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + val + + +
      +

      The value to negate.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the logical negation of the given operand.

      + +
      +
      +
      +
    • +
    • +
      + + + + &(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant bitwise logical AND with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func &(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first operand.

      + +
      +
      + + rhs + + +
      +

      The second operand.

      + +
      +
      + + name + + +
      +

      The name for the newly inserted instruction.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the logical OR of the values of the two given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + |(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant bitwise logical OR with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func |(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first operand.

      + +
      +
      + + rhs + + +
      +

      The second operand.

      + +
      +
      + + name + + +
      +

      The name for the newly inserted instruction.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the logical OR of the values of the two given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + ^(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant bitwise logical exclusive OR with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func ^(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first operand.

      + +
      +
      + + rhs + + +
      +

      The second operand.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the exclusive OR of the values of the two given operands.

      + +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + +
    + diff --git a/docs/Structs/FunctionType.html b/docs/Structs/FunctionType.html index cdaca798..e2fea9c9 100644 --- a/docs/Structs/FunctionType.html +++ b/docs/Structs/FunctionType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -451,7 +483,7 @@

    Declaration

    diff --git a/docs/Structs/Global.html b/docs/Structs/Global.html index 65d16906..cbd06c54 100644 --- a/docs/Structs/Global.html +++ b/docs/Structs/Global.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -491,7 +523,7 @@

    Declaration

    diff --git a/docs/Structs/Instruction.html b/docs/Structs/Instruction.html index c833c518..ddd0b109 100644 --- a/docs/Structs/Instruction.html +++ b/docs/Structs/Instruction.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -457,7 +489,7 @@

    Declaration

    diff --git a/docs/Structs/IntType.html b/docs/Structs/IntType.html index a976f73e..d8022b61 100644 --- a/docs/Structs/IntType.html +++ b/docs/Structs/IntType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -518,9 +550,69 @@

    Return Value

  • - + + + constant(_:signExtend:) + +
    +
    +
    +
    +
    +
    +

    Creates an unsigned integer constant value with the given Swift integer value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func constant<IntTy: UnsignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Unsigned>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + value + + +
    +

    A Swift integer value.

    + +
    +
    + + signExtend + + +
    +

    Whether to sign-extend this value to fit this type’s bit width. Defaults to false.

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + - constant(_:signExtend:) + constant(_:signExtend:)
    @@ -528,14 +620,14 @@

    Return Value

    -

    Creates an integer constant value with the given Swift integer value.

    +

    Creates a signed integer constant value with the given Swift integer value.

    Declaration

    Swift

    -
    public func constant<IntTy: Integer>(_ value: IntTy, signExtend: Bool = false) -> IRValue
    +
    public func constant<IntTy: SignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Signed>
    @@ -640,7 +732,7 @@

    Declaration

    diff --git a/docs/Structs/LabelType.html b/docs/Structs/LabelType.html index 049bcdc4..e5cc5d1b 100644 --- a/docs/Structs/LabelType.html +++ b/docs/Structs/LabelType.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -321,7 +353,7 @@

    Declaration

    diff --git a/docs/Structs/MetadataType.html b/docs/Structs/MetadataType.html index d6695ad9..c5abab9d 100644 --- a/docs/Structs/MetadataType.html +++ b/docs/Structs/MetadataType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -322,7 +354,7 @@

    Declaration

    diff --git a/docs/Structs/Parameter.html b/docs/Structs/Parameter.html index 1dc4857c..17cb1c14 100644 --- a/docs/Structs/Parameter.html +++ b/docs/Structs/Parameter.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -348,7 +380,7 @@

    Declaration

    diff --git a/docs/Structs/PhiNode.html b/docs/Structs/PhiNode.html index 921d5ce8..83f9e34e 100644 --- a/docs/Structs/PhiNode.html +++ b/docs/Structs/PhiNode.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -503,7 +535,7 @@

    Declaration

    diff --git a/docs/Structs/PointerType.html b/docs/Structs/PointerType.html index 84b68c5d..b05036b4 100644 --- a/docs/Structs/PointerType.html +++ b/docs/Structs/PointerType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -444,7 +476,7 @@

    Declaration

    diff --git a/docs/Structs/StructType.html b/docs/Structs/StructType.html index dcc472cd..83e08678 100644 --- a/docs/Structs/StructType.html +++ b/docs/Structs/StructType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -526,7 +558,7 @@

    Declaration

    diff --git a/docs/Structs/Switch.html b/docs/Structs/Switch.html index 27df325f..39c9ce42 100644 --- a/docs/Structs/Switch.html +++ b/docs/Structs/Switch.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -358,7 +390,7 @@

    Declaration

    diff --git a/docs/Structs/TokenType.html b/docs/Structs/TokenType.html index 6d87f95b..9f72509a 100644 --- a/docs/Structs/TokenType.html +++ b/docs/Structs/TokenType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -323,7 +355,7 @@

    Declaration

    diff --git a/docs/Structs/Use.html b/docs/Structs/Use.html index 718d780f..0f123232 100644 --- a/docs/Structs/Use.html +++ b/docs/Structs/Use.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -349,7 +381,7 @@

    Declaration

    diff --git a/docs/Structs/VectorType.html b/docs/Structs/VectorType.html index b6b94653..eb7cd4a2 100644 --- a/docs/Structs/VectorType.html +++ b/docs/Structs/VectorType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -411,7 +443,7 @@

    Declaration

    diff --git a/docs/Structs/VoidType.html b/docs/Structs/VoidType.html index 2a383b23..e1f32376 100644 --- a/docs/Structs/VoidType.html +++ b/docs/Structs/VoidType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -321,7 +353,7 @@

    Declaration

    diff --git a/docs/Structs/X86MMXType.html b/docs/Structs/X86MMXType.html index d4e00ee2..27b8c3b7 100644 --- a/docs/Structs/X86MMXType.html +++ b/docs/Structs/X86MMXType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -326,7 +358,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes.html index f817bb9e..e7708f02 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -437,11 +469,11 @@

    Declaration

    provides simple methods for reading files and standard input into a memory buffer. In addition to basic access to the characters in the file, this interface guarantees you can read one character past the end of the file, -and that this character will read as ’\0’.

    +and that this character will read as ‘\0’.

    -

    The ’\0’ guarantee is needed to support an optimization – it’s intended to +

    The ‘\0’ guarantee is needed to support an optimization – it’s intended to be more efficient for clients which are reading all the data to stop -reading when they encounter a ’\0’ than to continually check the file +reading when they encounter a ‘\0’ than to continually check the file position to see if it has reached the end of the file.

    See more @@ -593,7 +625,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Context.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Context.html index 88c3fe81..020ab528 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Context.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Context.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -321,7 +353,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Function.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Function.html index 5557354e..be3451ab 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Function.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Function.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -264,6 +296,33 @@

    Function

      +
    • +
      + + + + callingConvention + +
      +
      +
      +
      +
      +
      +

      Accesses the calling convention for this function.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public var callingConvention: CallingConvention
      + +
      +
      +
      +
      +
    • @@ -693,7 +752,7 @@

      Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/FunctionPassManager.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/FunctionPassManager.html index bb28695d..eb6354e6 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/FunctionPassManager.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/FunctionPassManager.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -390,7 +422,7 @@

    Parameters

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/IRBuilder.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/IRBuilder.html index 51fbb374..955f4f16 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/IRBuilder.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/IRBuilder.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -1255,7 +1287,7 @@

    Parameters

    - lhs + rhs @@ -1351,7 +1383,7 @@

    Parameters

    - lhs + rhs @@ -4549,9 +4581,9 @@

    Global Variable Instructions

  • @@ -4566,7 +4598,7 @@

    Global Variable Instructions

    Declaration

    Swift

    -
    public func addGlobal(_ name: String, type: IRType) -> Global
    +
    public func addGlobal(_ name: String, type: IRType, addressSpace: Int? = nil) -> Global
    @@ -4600,6 +4632,19 @@

    Parameters

    + + + + addressSpace + + + +
    +

    The optional address space where the global variable resides.

    + +
    + + @@ -4896,7 +4941,7 @@

    Return Value

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/JIT.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/JIT.html index 249cf5b3..0a349b48 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/JIT.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/JIT.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -282,11 +314,17 @@

    JIT

    provided Module to the architecture of the provided TargetMachine, and execute it.

    +

  • parameters:

    + +

      +
    • module: The module containing code you wish to execute
    • +
    • machine: The target machine which you’re compiling for
    • +
  • Throws

    - JITError + JITError

    -
    +

    @@ -350,6 +388,15 @@

    Parameters

    it to machine code for the target architecture used to initialize this JIT.

    +
      +
    • parameters: + +
        +
      • function: The function you wish to execute
      • +
      • args: The arguments you wish to pass to the function
      • +
    • +
    +

    Declaration

    @@ -400,6 +447,144 @@

    Return Value

    +
  • + +
    +
    +
    +
    +
    +

    Retrieves a pointer to the function compiled by this JIT. +- parameter name: The name of the function you wish to look up. +- returns: A pointer to the result of compiling the specified function. +- note: You will have to unsafeBitCast this pointer to + the appropriate @convention(c) function type to be + able to run it from Swift.

    + +
    typealias FnPtr = @convention(c) () -> Double
    +let fnAddr = jit.addressOfFunction(name: "test")
    +let fn = unsafeBitCast(fnAddr, to: FnPtr.self)
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func addressOfFunction(name: String) -> OpaquePointer?
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + name + + +
    +

    The name of the function you wish to look up.

    + +
    +
    +
    +
    +

    Return Value

    +

    A pointer to the result of compiling the specified function.

    + +
    +
    +
    +
  • +
  • +
    + + + + addModule(_:) + +
    +
    +
    +
    +
    +
    +

    Adds the provided module, and all top-level declarations into this JIT. +- parameter module: The module you wish to add.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func addModule(_ module: Module)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + module + + +
    +

    The module you wish to add.

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + removeModule(_:) + +
    +
    +
    +
    +
    +
    +

    Removes the provided module, and all top-level declarations, from this +JIT.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func removeModule(_ module: Module) throws
    + +
    +
    +
    +
    +
  • @@ -417,6 +602,15 @@

    Return Value

    executable. It takes an array of argument strings and passes them into the function as argc and argv.

    +
      +
    • parameters: + +
        +
      • function: The main function you wish to execute
      • +
      • args: The string arguments you wish to pass to the function
      • +
    • +
    +

    Declaration

    @@ -472,7 +666,7 @@

    Return Value

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/MemoryBuffer.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/MemoryBuffer.html index 8e678100..47291f1b 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/MemoryBuffer.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/MemoryBuffer.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -260,11 +292,11 @@

    MemoryBuffer

    provides simple methods for reading files and standard input into a memory buffer. In addition to basic access to the characters in the file, this interface guarantees you can read one character past the end of the file, -and that this character will read as ’\0’.

    +and that this character will read as ‘\0’.

    -

    The ’\0’ guarantee is needed to support an optimization – it’s intended to +

    The ‘\0’ guarantee is needed to support an optimization – it’s intended to be more efficient for clients which are reading all the data to stop -reading when they encounter a ’\0’ than to continually check the file +reading when they encounter a ‘\0’ than to continually check the file position to see if it has reached the end of the file.

    @@ -316,6 +348,18 @@

    Declaration

    Creates a MemoryBuffer that points to a specified UnsafeBufferPointer.

    +
      +
    • parameters: + +
        +
      • buffer: The underlying buffer that contains the data.
      • +
      • name: The name for the new memory buffer.
      • +
      • requiresNullTerminator: Whether or not the MemoryBuffer should + append a null terminator. Defaults to + false
      • +
    • +
    +

    Declaration

    @@ -392,6 +436,15 @@

    Parameters

    Creates a MemoryBuffer by copying the data within a specified UnsafeBufferPointer.

    +
      +
    • parameters: + +
        +
      • buffer: The underlying buffer that contains the data.
      • +
      • name: The name for the new memory buffer.
      • +
    • +
    +

    Declaration

    @@ -579,7 +632,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Module.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Module.html index 9579a998..8b10d651 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Module.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Module.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -378,6 +410,33 @@

    Declaration

    +
  • +
    + + + + name + +
    +
    +
    +
    +
    +
    +

    The identifier of this module.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var name: String
    + +
    +
    +
    +
    +
  • @@ -892,7 +951,7 @@

    Return Value

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Target.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Target.html index 8499f982..971616b1 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Target.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Target.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -295,7 +327,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/TargetData.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/TargetData.html index a9e0c8cd..d2e7329d 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/TargetData.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/TargetData.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -997,7 +1029,7 @@

    Return Value

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/TargetMachine.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/TargetMachine.html index 5a080cb5..0070dcbc 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Classes/TargetMachine.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/TargetMachine.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -616,7 +648,7 @@

    Parameters

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums.html index 11d024b1..8a34307b 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -253,6 +285,91 @@

    Enums

    +
    +
      +
    • +
      + + + + Unsigned + +
      +
      +
      +
      +
      +
      +

      Represents unsigned integral types and operations.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public enum Unsigned: IntegralConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    • +
      + + + + Signed + +
      +
      +
      +
      +
      +
      +

      Represents signed integral types and operations.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public enum Signed: IntegralConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    • +
      + + + + Floating + +
      +
      +
      +
      +
      +
      +

      Represents floating types and operations.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public enum Floating: ConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    +
    • @@ -286,6 +403,41 @@

      Declaration

    +
    +
      +
    • +
      + + + + CallingConvention + +
      +
      +
      +
      +
      +
      +

      Enumerates the calling conventions supported by LLVM.

      + +

      The raw values of this enumeration must match those in +llvm-c/Core.h

      + + See more +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public enum CallingConvention: UInt32
      + +
      +
      +
      +
      +
    • +
    +
    • @@ -856,7 +1008,7 @@

      Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/AtomicOrdering.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/AtomicOrdering.html index 6bee37c0..0fa4ce3c 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/AtomicOrdering.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/AtomicOrdering.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -705,7 +737,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/AtomicReadModifyWriteOperation.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/AtomicReadModifyWriteOperation.html index 23610b07..42f7c3e9 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/AtomicReadModifyWriteOperation.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/AtomicReadModifyWriteOperation.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -677,7 +709,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/ByteOrder.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/ByteOrder.html index e037b60c..0a8e1679 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/ByteOrder.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/ByteOrder.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -339,7 +371,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/CallingConvention.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/CallingConvention.html new file mode 100644 index 00000000..498a5056 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/CallingConvention.html @@ -0,0 +1,536 @@ + + + + CallingConvention Enum Reference + + + + + + + + + + +
    +
    +

    Docs (100% documented)

    +
    +
    +
    + +
    +
    + +
    +
    +
    +

    CallingConvention

    +
    +
    +
    public enum CallingConvention: UInt32
    + +
    +
    +

    Enumerates the calling conventions supported by LLVM.

    + +

    The raw values of this enumeration must match those in +llvm-c/Core.h

    + +
    +
    +
    +
      +
    • +
      + + + + c + +
      +
      +
      +
      +
      +
      +

      The default LLVM calling convention, compatible with C.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case c = 0
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + fast + +
      +
      +
      +
      +
      +
      +

      This calling convention attempts to make calls as fast as possible +(e.g. by passing things in registers).

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case fast = 8
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + cold + +
      +
      +
      +
      +
      +
      +

      This calling convention attempts to make code in the caller as efficient +as possible under the assumption that the call is not commonly executed.
      +As such, these calls often preserve all registers so that the call does +not break any live ranges in the caller side.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case cold = 9
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + webKitJS + +
      +
      +
      +
      +
      +
      +

      Calling convention for stack based JavaScript calls.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case webKitJS = 12
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + anyReg + +
      +
      +
      +
      +
      +
      +

      Calling convention for dynamic register based calls +(e.g. stackmap and patchpoint intrinsics).

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case anyReg = 13
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + x86Stdcall + +
      +
      +
      +
      +
      +
      +

      The calling conventions mostly used by the Win32 API.

      + +

      It is basically the same as the C convention with the difference in that +the callee is responsible for popping the arguments from the stack.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case x86Stdcall = 64
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
      +
    • +
      + + + + x86Fastcall + +
      +
      +
      +
      +
      +
      +

      Fast analog of x86Stdcall.

      + +

      Passes first two arguments in ECX:EDX registers, others via the stack. +The callee is responsible for stack cleaning.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case x86Fastcall = 65
      + +
      +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodeGenOptLevel.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodeGenOptLevel.html index 15c9ae0c..dab24d19 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodeGenOptLevel.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodeGenOptLevel.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -464,7 +496,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodeModel.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodeModel.html index d0e8c98b..4a5ecff1 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodeModel.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodeModel.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -533,7 +565,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodegenFileType.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodegenFileType.html index 252a22f8..a16d004b 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodegenFileType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/CodegenFileType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -388,7 +420,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/FloatType.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/FloatType.html index 130aaa1c..5138994b 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/FloatType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/FloatType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -452,9 +484,9 @@

    Declaration

  • @@ -469,7 +501,7 @@

    Declaration

    Declaration

    Swift

    -
    public func constant(_ value: Double) -> IRValue
    +
    public func constant(_ value: Double) -> Constant<Floating>
    @@ -508,7 +540,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/FunctionPass.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/FunctionPass.html index 04753d49..171607f7 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/FunctionPass.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/FunctionPass.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -1873,7 +1905,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/IntPredicate.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/IntPredicate.html index 914bd27d..7beca97b 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/IntPredicate.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/IntPredicate.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -614,7 +646,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/JITError.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/JITError.html index 0c683b55..c9bc7223 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/JITError.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/JITError.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,6 +325,38 @@

    Declaration

    +
    +
      +
    • +
      + + + + couldNotRemoveModule + +
      +
      +
      +
      +
      +
      +

      The JIT was unable to remove the provided module. A message is provided +explaining the failure

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      case couldNotRemoveModule(Module, String)
      + +
      +
      +
      +
      +
    • +
    +
    • @@ -327,7 +391,7 @@

      Declaration

      diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/Linkage.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/Linkage.html index e800b20c..f3c564d7 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/Linkage.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/Linkage.html @@ -74,6 +74,9 @@
    • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@
    + + @@ -713,7 +745,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/MemoryBufferError.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/MemoryBufferError.html index 7e9289e6..6acf31d4 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/MemoryBufferError.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/MemoryBufferError.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -295,7 +327,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/ModuleError.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/ModuleError.html index 17f903d1..c3dc1d9b 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/ModuleError.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/ModuleError.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -392,7 +424,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/OpCode.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/OpCode.html index 01611ba8..d29198dc 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/OpCode.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/OpCode.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -2250,7 +2282,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/OverflowBehavior.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/OverflowBehavior.html index 878fe88a..44fbff49 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/OverflowBehavior.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/OverflowBehavior.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -360,7 +392,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/RealPredicate.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/RealPredicate.html index d91ddd2a..eb89e1c5 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/RealPredicate.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/RealPredicate.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -790,7 +822,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/RelocMode.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/RelocMode.html index f9872677..7174e271 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/RelocMode.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/RelocMode.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -420,7 +452,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/TargetMachineError.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/TargetMachineError.html index ca733363..f1a49149 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/TargetMachineError.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/TargetMachineError.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -424,7 +456,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/Visibility.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/Visibility.html index d639a23a..88b78670 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Enums/Visibility.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/Visibility.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -398,7 +430,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions.html index 0f5b40d5..619cda04 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -611,7 +643,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Bool.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Bool.html index 3f6ba580..cceab153 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Bool.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Bool.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int.html index 85f1c930..7e4b6030 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int16.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int16.html index 98161eb5..eb35b6d8 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int16.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int16.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int32.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int32.html index 3fd59143..c76aa0b0 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int32.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int32.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int64.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int64.html index 42fc6c76..ede673ae 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int64.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int64.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int8.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int8.html index ccadf144..133d6992 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int8.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Int8.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/LLVMValueRef.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/LLVMValueRef.html index 1414a050..c3e1eb73 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/LLVMValueRef.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/LLVMValueRef.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html index 73a87764..eafc7071 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt.html index c9889393..5049c50c 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt16.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt16.html index 7ee29190..39fe7e24 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt16.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt16.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt32.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt32.html index 64d271ff..0ceb3e24 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt32.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt32.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt64.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt64.html index f348badb..5fc8c224 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt64.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt64.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt8.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt8.html index 12a05abe..1a1ebfb1 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt8.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/UInt8.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -293,7 +325,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Functions.html b/docs/docsets/.docset/Contents/Resources/Documents/Functions.html new file mode 100644 index 00000000..5abe2cec --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Functions.html @@ -0,0 +1,413 @@ + + + + Functions Reference + + + + + + + + + +
    +
    +

    Docs (100% documented)

    +
    +
    +
    + +
    +
    + +
    +
    +
    +

    Functions

    +

    The following functions are available globally.

    + +
    +
    +
    + +
      +
    • +
      + + + + -(_:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant negate operation to negate an integral value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public prefix func -(lhs: Constant<Signed>) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + lhs + + +
      +

      The operand to negate.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the negation of the given constant.

      + +
      +
      +
      +
    • +
    • +
      + + + + -(_:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant negate operation to negate a floating value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public prefix func -(lhs: Constant<Floating>) -> Constant<Floating>
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + lhs + + +
      +

      The operand to negate.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the negation of the given constant.

      + +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + +
    + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Protocols.html b/docs/docsets/.docset/Contents/Resources/Documents/Protocols.html index 9ba13ff2..b106afe3 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Protocols.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Protocols.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -253,6 +285,64 @@

    Protocols

    +
    +
      +
    • + +
      +
      +
      +
      +
      +

      A protocol to which the phantom types for a constant’s representation conform.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public protocol ConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      A protocol to which the phantom types for integral constants conform.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public protocol IntegralConstantRepresentation: ConstantRepresentation
      + +
      +
      +
      +
      +
    • +
    +
    • @@ -355,7 +445,7 @@

      Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRGlobal.html b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRGlobal.html index 1d9c7b2b..31392e6f 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRGlobal.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRGlobal.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -328,7 +360,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRType.html b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRType.html index ccd43edf..1e9a7b66 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -424,7 +456,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRValue.html b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRValue.html index 0c3a8e72..eec56fd3 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRValue.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/IRValue.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -430,7 +462,7 @@

    Declaration

    -

    Whether or not the underlying LLVM value is a Constant

    +

    Whether or not the underlying LLVM value is a Constant

    @@ -2933,7 +2965,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs.html index d11e980c..08f2ce51 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -364,6 +396,53 @@

    Declaration

    +
    + +
      +
    • +
      + + + + Constant + +
      +
      +
      +
      +
      +
      +

      A Constant represents a value initialized to a constant. Constant values +may be manipulated with standard Swift arithmetic operations and used with +standard IR Builder instructions like any other operand. The difference +being any instructions acting solely on constants and any arithmetic +performed on constants is evaluated at compile-time only.

      + +

      Constants keep track of the values they represent at the type level to +disallow mixed-type arithmetic. Use the cast family of operations to +safely convert constants to other representations.

      + + See more +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public struct Constant<Repr: ConstantRepresentation>: IRValue
      + +
      +
      +
      +
      +
    • +
    +
    • @@ -958,7 +1037,7 @@

      Declaration

      diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Alias.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Alias.html index e3e4de72..90dddc57 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Alias.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Alias.html @@ -74,6 +74,9 @@
    • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@
    + + @@ -295,7 +327,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/ArrayType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/ArrayType.html index 2eca9f0e..bf483d64 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/ArrayType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/ArrayType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -442,7 +474,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/BasicBlock.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/BasicBlock.html index 4d3467b3..493b1285 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/BasicBlock.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/BasicBlock.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -579,7 +611,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Constant.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Constant.html new file mode 100644 index 00000000..6306092e --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Constant.html @@ -0,0 +1,1716 @@ + + + + Constant Struct Reference + + + + + + + + + + +
    +
    +

    Docs (100% documented)

    +
    +
    +
    + +
    +
    + +
    +
    +
    +

    Constant

    +
    +
    +
    public struct Constant<Repr: ConstantRepresentation>: IRValue
    + +
    +
    +

    A Constant represents a value initialized to a constant. Constant values +may be manipulated with standard Swift arithmetic operations and used with +standard IR Builder instructions like any other operand. The difference +being any instructions acting solely on constants and any arithmetic +performed on constants is evaluated at compile-time only.

    + +

    Constants keep track of the values they represent at the type level to +disallow mixed-type arithmetic. Use the cast family of operations to +safely convert constants to other representations.

    + +
    +
    +
    +
      +
    • +
      + + + + asLLVM() + +
      +
      +
      +
      +
      +
      +

      Retrieves the underlying LLVM constant object.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func asLLVM() -> LLVMValueRef
      + +
      +
      +
      +
      +
    • +
    +
    +
    + +
      +
    • +
      + + + + cast(to:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant cast to a given integral type.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func cast<T: IntegralConstantRepresentation>(to type: IntType) -> Constant<T>
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + type + + +
      +

      The type to cast towards.

      + +
      +
      +
      +
      +

      Return Value

      +

      A const value representing this value cast to the given integral type.

      + +
      +
      +
      +
    • +
    • +
      + + + + cast(to:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant cast to a given floating type.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func cast(to type: FloatType) -> Constant<Floating>
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + type + + +
      +

      The type to cast towards.

      + +
      +
      +
      +
      +

      Return Value

      +

      A const value representing this value cast to the given floating type.

      + +
      +
      +
      +
    • +
    +
    +
    + +
      +
    • + +
      +
      +
      +
      +
      +

      Creates a constant negate operation to negate a value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func negate(_ lhs: Constant<Signed>, overflowBehavior: OverflowBehavior = .default) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The operand to negate.

      + +
      +
      + + overflowBehavior + + +
      +

      Should overflow occur, specifies the behavior of the resulting constant value.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the negation of the given constant.

      + +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      Creates a constant add operation to add two homogenous constants together.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func add(_ lhs: Constant, _ rhs: Constant, overflowBehavior: OverflowBehavior = .default) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first summand value (the augend).

      + +
      +
      + + rhs + + +
      +

      The second summand value (the addend).

      + +
      +
      + + overflowBehavior + + +
      +

      Should overflow occur, specifies the behavior of the resulting constant value.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the sum of the two operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + +(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant add operation to add two homogenous constants together.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func +(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first summand value (the augend).

      + +
      +
      + + rhs + + +
      +

      The second summand value (the addend).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the sum of the two operands.

      + +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      Creates a constant sub operation to subtract two homogenous constants.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func subtract(_ lhs: Constant, _ rhs: Constant, overflowBehavior: OverflowBehavior = .default) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value (the minuend).

      + +
      +
      + + rhs + + +
      +

      The second value (the subtrahend).

      + +
      +
      + + overflowBehavior + + +
      +

      Should overflow occur, specifies the behavior of the resulting constant value.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the difference of the two operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + -(_:_:) + +
      +
      +
      +
      +
      +
      +

      Creates a constant sub operation to subtract two homogenous constants.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func -(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value (the minuend).

      + +
      +
      + + rhs + + +
      +

      The second value (the subtrahend).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the difference of the two operands.

      + +
      +
      +
      +
    • +
    • + +
      +
      +
      +
      +
      +

      Creates a constant multiply operation with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func multiply(_ lhs: Constant, _ rhs: Constant, overflowBehavior: OverflowBehavior = .default) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first factor value (the multiplier).

      + +
      +
      + + rhs + + +
      +

      The second factor value (the multiplicand).

      + +
      +
      + + overflowBehavior + + +
      +

      Should overflow occur, specifies the behavior of the resulting constant value.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the product of the two operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + *(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant multiply operation with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func *(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first factor value (the multiplier).

      + +
      +
      + + rhs + + +
      +

      The second factor value (the multiplicand).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the product of the two operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + /(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant divide operation that provides the remainder after divison of +the first value by the second value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func /(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value (the dividend).

      + +
      +
      + + rhs + + +
      +

      The second value (the divisor).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the quotient of the first and second operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + %(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant remainder operation that provides the remainder after divison +of the first value by the second value.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func %(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value (the dividend).

      + +
      +
      + + rhs + + +
      +

      The second value (the divisor).

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the remainder of division of the first operand by the second operand.

      + +
      +
      +
      +
    • +
    +
    +
    + +
      +
    • +
      + + + + ==(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant equality comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func ==(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + <(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant less-than comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func <(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + >(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant greater-than comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func >(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + <=(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant less-than-or-equal comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func <=(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + >=(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant greater-than-or-equal comparison between two values.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func >=(lhs: Constant, rhs: Constant) -> Constant<Signed>
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first value to compare.

      + +
      +
      + + rhs + + +
      +

      The second value to compare.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant integral value (i1) representing the result of the comparision of the given operands.

      + +
      +
      +
      +
    • +
    +
    +
    + +
      +
    • +
      + + + + !(_:) + +
      +
      +
      +
      +
      +
      +

      A constant bitwise logical not with the given integral value as an operand.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static prefix func !(lhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + val + + +
      +

      The value to negate.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the logical negation of the given operand.

      + +
      +
      +
      +
    • +
    • +
      + + + + &(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant bitwise logical AND with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func &(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first operand.

      + +
      +
      + + rhs + + +
      +

      The second operand.

      + +
      +
      + + name + + +
      +

      The name for the newly inserted instruction.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the logical OR of the values of the two given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + |(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant bitwise logical OR with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func |(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + + + + + +
      + + lhs + + +
      +

      The first operand.

      + +
      +
      + + rhs + + +
      +

      The second operand.

      + +
      +
      + + name + + +
      +

      The name for the newly inserted instruction.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the logical OR of the values of the two given operands.

      + +
      +
      +
      +
    • +
    • +
      + + + + ^(_:_:) + +
      +
      +
      +
      +
      +
      +

      A constant bitwise logical exclusive OR with the given values as operands.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public static func ^(lhs: Constant, rhs: Constant) -> Constant
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + lhs + + +
      +

      The first operand.

      + +
      +
      + + rhs + + +
      +

      The second operand.

      + +
      +
      +
      +
      +

      Return Value

      +

      A constant value representing the exclusive OR of the values of the two given operands.

      + +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + +
    + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/FunctionType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/FunctionType.html index cdaca798..e2fea9c9 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/FunctionType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/FunctionType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -451,7 +483,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Global.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Global.html index 65d16906..cbd06c54 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Global.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Global.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -491,7 +523,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Instruction.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Instruction.html index c833c518..ddd0b109 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Instruction.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Instruction.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -457,7 +489,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/IntType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/IntType.html index a976f73e..d8022b61 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/IntType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/IntType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -518,9 +550,69 @@

    Return Value

  • +
    +
    +
    +
    +
    +

    Creates an unsigned integer constant value with the given Swift integer value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func constant<IntTy: UnsignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Unsigned>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + value + + +
    +

    A Swift integer value.

    + +
    +
    + + signExtend + + +
    +

    Whether to sign-extend this value to fit this type’s bit width. Defaults to false.

    + +
    +
    +
    +
    +
    +
  • +
  • +
    @@ -528,14 +620,14 @@

    Return Value

    -

    Creates an integer constant value with the given Swift integer value.

    +

    Creates a signed integer constant value with the given Swift integer value.

    Declaration

    Swift

    -
    public func constant<IntTy: Integer>(_ value: IntTy, signExtend: Bool = false) -> IRValue
    +
    public func constant<IntTy: SignedInteger>(_ value: IntTy, signExtend: Bool = false) -> Constant<Signed>
    @@ -640,7 +732,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/LabelType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/LabelType.html index 049bcdc4..e5cc5d1b 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/LabelType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/LabelType.html @@ -74,6 +74,9 @@
  • + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -321,7 +353,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/MetadataType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/MetadataType.html index d6695ad9..c5abab9d 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/MetadataType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/MetadataType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -322,7 +354,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Parameter.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Parameter.html index 1dc4857c..17cb1c14 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Parameter.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Parameter.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -348,7 +380,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/PhiNode.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/PhiNode.html index 921d5ce8..83f9e34e 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/PhiNode.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/PhiNode.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -503,7 +535,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/PointerType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/PointerType.html index 84b68c5d..b05036b4 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/PointerType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/PointerType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -444,7 +476,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/StructType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/StructType.html index dcc472cd..83e08678 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/StructType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/StructType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -526,7 +558,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Switch.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Switch.html index 27df325f..39c9ce42 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Switch.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Switch.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -358,7 +390,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/TokenType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/TokenType.html index 6d87f95b..9f72509a 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/TokenType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/TokenType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -323,7 +355,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Use.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Use.html index 718d780f..0f123232 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/Use.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/Use.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -349,7 +381,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/VectorType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/VectorType.html index b6b94653..eb7cd4a2 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/VectorType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/VectorType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -411,7 +443,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/VoidType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/VoidType.html index 2a383b23..e1f32376 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/VoidType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/VoidType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -321,7 +353,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Structs/X86MMXType.html b/docs/docsets/.docset/Contents/Resources/Documents/Structs/X86MMXType.html index d4e00ee2..27b8c3b7 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/Structs/X86MMXType.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/Structs/X86MMXType.html @@ -74,6 +74,9 @@ + @@ -86,6 +89,9 @@ + @@ -116,9 +122,15 @@ + + @@ -168,9 +180,23 @@ + + @@ -326,7 +358,7 @@

    Declaration

    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/index.html b/docs/docsets/.docset/Contents/Resources/Documents/index.html index d806157e..c202b2f9 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/index.html +++ b/docs/docsets/.docset/Contents/Resources/Documents/index.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -249,7 +281,9 @@
    -

    LLVMSwift Build Status Documentation

    +

    LLVMSwift

    + +

    Build Status Documentation Slack Invite

    LLVMSwift is a set of Swifty API wrappers for the LLVM C API. It makes compiler development feel great from Swift!

    @@ -263,9 +297,9 @@

    Once you do that, you can start adding functions, global variables, and generating instructions!

    let main = builder.addFunction(name: "main", 
    -                               type: FunctionType(argTypes: [], 
    -                                                  returnType: VoidType())
    -let entry = builder.appendBasicBlock(named: "entry")
    +                               type: FunctionType(argTypes: [],
    +                                                  returnType: VoidType()))
    +let entry = main.appendBasicBlock(named: "entry")
     builder.positionAtEnd(of: entry)
     
     builder.buildRetVoid()
    @@ -312,6 +346,26 @@
     
     

    Once you do that, you can add LLVMSwift as a dependency for your own Swift compiler projects!

    +

    Installation without Swift Package Manager

    + +

    We really recommend using SwiftPM with LLVMSwift, but if your project is +structured in such a way that makes using SwiftPM impractical or impossible, +you can still use LLVMSwift by passing the -DNO_SWIFTPM to swift when +compiling.

    + +
      +
    • Xcode: + +
        +
      • Add this repository as a git submodule
      • +
      • Add the files in Sources/ to your Xcode project.
      • +
      • Under Other Swift Flags, add -DNO_SWIFTPM.
      • +
      • Under Library Search Paths add the output of llvm-config --libdir
      • +
      • Under Header Search Paths add the output of llvm-config --includedir
      • +
      • Under Link Target with Libraries drag in +/path/to/your/llvm/lib/libLLVM.dylib
      • +
    • +

    This project is used by Trill for all its code generation.

    @@ -329,7 +383,7 @@
    diff --git a/docs/docsets/.docset/Contents/Resources/Documents/undocumented.json b/docs/docsets/.docset/Contents/Resources/Documents/undocumented.json index 62c68f94..3f4c89be 100644 --- a/docs/docsets/.docset/Contents/Resources/Documents/undocumented.json +++ b/docs/docsets/.docset/Contents/Resources/Documents/undocumented.json @@ -2,5 +2,5 @@ "warnings": [ ], - "source_directory": "/Users/harlan/Documents/Code/Swift/LLVMSwift" + "source_directory": "/Users/cfi/Desktop/LLVMSwift" } \ No newline at end of file diff --git a/docs/docsets/.docset/Contents/Resources/docSet.dsidx b/docs/docsets/.docset/Contents/Resources/docSet.dsidx index 173e6fec..38508d37 100644 Binary files a/docs/docsets/.docset/Contents/Resources/docSet.dsidx and b/docs/docsets/.docset/Contents/Resources/docSet.dsidx differ diff --git a/docs/docsets/.tgz b/docs/docsets/.tgz index a47928b8..38e9f91f 100644 Binary files a/docs/docsets/.tgz and b/docs/docsets/.tgz differ diff --git a/docs/index.html b/docs/index.html index d806157e..c202b2f9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -73,6 +73,9 @@ + @@ -85,6 +88,9 @@ + @@ -115,9 +121,15 @@ + + @@ -167,9 +179,23 @@ + + @@ -249,7 +281,9 @@
    -

    LLVMSwift Build Status Documentation

    +

    LLVMSwift

    + +

    Build Status Documentation Slack Invite

    LLVMSwift is a set of Swifty API wrappers for the LLVM C API. It makes compiler development feel great from Swift!

    @@ -263,9 +297,9 @@

    Once you do that, you can start adding functions, global variables, and generating instructions!

    let main = builder.addFunction(name: "main", 
    -                               type: FunctionType(argTypes: [], 
    -                                                  returnType: VoidType())
    -let entry = builder.appendBasicBlock(named: "entry")
    +                               type: FunctionType(argTypes: [],
    +                                                  returnType: VoidType()))
    +let entry = main.appendBasicBlock(named: "entry")
     builder.positionAtEnd(of: entry)
     
     builder.buildRetVoid()
    @@ -312,6 +346,26 @@
     
     

    Once you do that, you can add LLVMSwift as a dependency for your own Swift compiler projects!

    +

    Installation without Swift Package Manager

    + +

    We really recommend using SwiftPM with LLVMSwift, but if your project is +structured in such a way that makes using SwiftPM impractical or impossible, +you can still use LLVMSwift by passing the -DNO_SWIFTPM to swift when +compiling.

    + +
      +
    • Xcode: + +
        +
      • Add this repository as a git submodule
      • +
      • Add the files in Sources/ to your Xcode project.
      • +
      • Under Other Swift Flags, add -DNO_SWIFTPM.
      • +
      • Under Library Search Paths add the output of llvm-config --libdir
      • +
      • Under Header Search Paths add the output of llvm-config --includedir
      • +
      • Under Link Target with Libraries drag in +/path/to/your/llvm/lib/libLLVM.dylib
      • +
    • +

    This project is used by Trill for all its code generation.

    @@ -329,7 +383,7 @@
    diff --git a/docs/undocumented.json b/docs/undocumented.json index 62c68f94..3f4c89be 100644 --- a/docs/undocumented.json +++ b/docs/undocumented.json @@ -2,5 +2,5 @@ "warnings": [ ], - "source_directory": "/Users/harlan/Documents/Code/Swift/LLVMSwift" + "source_directory": "/Users/cfi/Desktop/LLVMSwift" } \ No newline at end of file