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
-
The default LLVM calling convention, compatible with C.
Declaration
Swift
case c = 0
-
This calling convention attempts to make calls as fast as possible (e.g. by passing things in registers).
Declaration
Swift
case fast = 8
-
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
-
Calling convention for stack based JavaScript calls.
Declaration
Swift
case webKitJS = 12
-
Calling convention for dynamic register based calls (e.g. stackmap and patchpoint intrinsics).
Declaration
Swift
case anyReg = 13
-
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
-
Fast
analog ofx86Stdcall.Passes first two arguments in ECX:EDX registers, others via the stack. The callee is responsible for stack cleaning.
Declaration
Swift
case x86Fastcall = 65
CallingConvention Enum Reference