Files
swift-mirror/include/swift/Runtime/RuntimeFunctions.def
Michael Gottesman 01c2e0fde9 [irgen] Make AsyncLetBegin and AsyncLetFinish UNKNOWN_MEMEFFECTS instead of ArgMemOnly.
In a discussion with @rjmccall, we agreed that these should really be
UNKNOWN_MEMEFFECTS so we are conservative.

Just slicing this off from a larger patch stream.
2025-11-14 15:08:41 -08:00

3088 lines
127 KiB
C++

//===--- RuntimeFunctions.def - Runtime Functions Database ------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines x-macros used for metaprogramming with the set of
// runtime functions.
//
// Runtime functions that read from object arguments cannot be marked
// ReadNone. Otherwise the objects may be freed before the runtime call.
// Runtime functions that instantiate metadata cannot be marked ReadNone
// or else they could be moved out of blocks controlled by a availability check.
//
//===----------------------------------------------------------------------===//
/// FUNCTION(Id, Name, CC, Availability, ReturnTys, ArgTys, Attrs, Effect)
/// Makes available as "Id" the following runtime function:
/// ReturnTy Name(ArgTys...);
/// ReturnTys is a call to RETURNS, which takes a non-empty list
/// of expressions meant to be looked up in IRGenModule.
/// ArgTys is either NO_ARGS or a call to ARGS, which takes a non-empty
/// list of expressions meant to be looked up in IRGenModule.
/// Attrs is a parenthesized list of attributes.
/// Effect is a list of runtime effects as defined by RuntimeEffect.
/// MemEffects is a list of memory effects
///
/// By default, passes Id to FUNCTION_ID. Therefore, the valid uses of
/// this database define either:
/// FUNCTION_ID
/// or all of the following:
/// FUNCTION
/// RETURNS
/// ARGS
/// NO_ARGS
/// ATTRS
/// NO_ATTRS
/// MEMEFFECTS
/// UNKNOWN_MEMEFFECTS
#ifndef FUNCTION
#define FUNCTION(Id, Module, Name, CC, Availability, ReturnTys, ArgTys, Attrs, Effect, MemEffects) \
FUNCTION_ID(Id)
#endif
FUNCTION(AllocBox, Swift, swift_allocBox, SwiftCC, AlwaysAvailable,
RETURNS(RefCountedPtrTy, OpaquePtrTy),
ARGS(TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
// BoxPair swift_makeBoxUnique(OpaqueValue *buffer, Metadata *type, size_t alignMask);
FUNCTION(MakeBoxUnique,
Swift, swift_makeBoxUnique,
SwiftCC, AlwaysAvailable,
RETURNS(RefCountedPtrTy, OpaquePtrTy),
ARGS(OpaquePtrTy, TypeMetadataPtrTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(DeallocBox, Swift, swift_deallocBox, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// swift_projectBox reads object metadata so cannot be marked ReadNone.
FUNCTION(ProjectBox, Swift, swift_projectBox, C_CC, AlwaysAvailable,
RETURNS(OpaquePtrTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
MEMEFFECTS(ArgMemReadOnly))
FUNCTION(AllocEmptyBox, Swift, swift_allocEmptyBox, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// RefCounted *swift_allocObject(Metadata *type, size_t size, size_t alignMask);
FUNCTION(AllocObject, Swift, swift_allocObject, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
// HeapObject *swift_initStackObject(HeapMetadata const *metadata,
// HeapObject *object);
FUNCTION(InitStackObject, Swift, swift_initStackObject, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(TypeMetadataPtrTy, RefCountedPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// HeapObject *swift_initStaticObject(HeapMetadata const *metadata,
// HeapObject *object);
FUNCTION(InitStaticObject, Swift, swift_initStaticObject, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(TypeMetadataPtrTy, RefCountedPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Locking),
UNKNOWN_MEMEFFECTS)
// void swift_verifyEndOfLifetime(HeapObject *object);
FUNCTION(VerifyEndOfLifetime, Swift, swift_verifyEndOfLifetime, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_deallocObject(HeapObject *obj, size_t size, size_t alignMask);
FUNCTION(DeallocObject, Swift, swift_deallocObject, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy, SizeTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_deallocUninitializedObject(HeapObject *obj, size_t size, size_t alignMask);
FUNCTION(DeallocUninitializedObject, Swift, swift_deallocUninitializedObject,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy, SizeTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_deallocClassInstance(HeapObject *obj, size_t size, size_t alignMask);
FUNCTION(DeallocClassInstance, Swift, swift_deallocClassInstance, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy, SizeTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_deallocPartialClassInstance(HeapObject *obj, HeapMetadata *type, size_t size, size_t alignMask);
FUNCTION(DeallocPartialClassInstance, Swift, swift_deallocPartialClassInstance,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy, TypeMetadataPtrTy, SizeTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_slowAlloc(size_t size, size_t alignMask);
FUNCTION(SlowAlloc, Swift, swift_slowAlloc, C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(SizeTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
// void swift_slowDealloc(void *ptr, size_t size, size_t alignMask);
FUNCTION(SlowDealloc, Swift, swift_slowDealloc, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, SizeTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_willThrow(error *ptr);
FUNCTION(WillThrow, Swift, swift_willThrow, SwiftCC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_errorInMain(error *ptr);
FUNCTION(ErrorInMain, Swift, swift_errorInMain, SwiftCC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ErrorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_unexpectedError(error *ptr);
FUNCTION(UnexpectedError, Swift, swift_unexpectedError, SwiftCC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ErrorPtrTy),
ATTRS(NoUnwind, NoReturn),
EFFECT(RuntimeEffect::NoEffect, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_copyPOD(void *dest, void *src, Metadata *self);
FUNCTION(CopyPOD, Swift, swift_copyPOD, C_CC, AlwaysAvailable,
RETURNS(OpaquePtrTy),
ARGS(OpaquePtrTy, OpaquePtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void *swift_retain(void *ptr);
FUNCTION(NativeStrongRetain, Swift, swift_retain, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, FirstParamReturned, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_release(void *ptr);
FUNCTION(NativeStrongRelease, Swift, swift_release, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_retain(void *ptr);
FUNCTION(NativeStrongRetainDirect, Swift, swift_retainDirect, SwiftDirectRR_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, FirstParamReturned, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_release(void *ptr);
FUNCTION(NativeStrongReleaseDirect, Swift, swift_releaseDirect, SwiftDirectRR_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_retain_n(void *ptr, int32_t n);
FUNCTION(NativeStrongRetainN, Swift, swift_retain_n, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy, Int32Ty),
ATTRS(NoUnwind, FirstParamReturned, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void *swift_release_n(void *ptr, int32_t n);
FUNCTION(NativeStrongReleaseN, Swift, swift_release_n, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy, Int32Ty),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_setDeallocating(void *ptr);
FUNCTION(NativeSetDeallocating, Swift, swift_setDeallocating,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void *swift_nonatomic_retain_n(void *ptr, int32_t n);
FUNCTION(NativeNonAtomicStrongRetainN, Swift, swift_nonatomic_retain_n, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy, Int32Ty),
ATTRS(NoUnwind, FirstParamReturned, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_nonatomic_release_n(void *ptr, int32_t n);
FUNCTION(NativeNonAtomicStrongReleaseN, Swift, swift_nonatomic_release_n, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_unknownObjectRetain_n(void *ptr, int32_t n);
FUNCTION(UnknownObjectRetainN, Swift, swift_unknownObjectRetain_n,
C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy, Int32Ty),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_unknownObjectRelease_n(void *ptr, int32_t n);
FUNCTION(UnknownObjectReleaseN, Swift, swift_unknownObjectRelease_n,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_nonatomic_unknownObjectRetain_n(void *ptr, int32_t n);
FUNCTION(NonAtomicUnknownObjectRetainN, Swift, swift_nonatomic_unknownObjectRetain_n,
C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy, Int32Ty),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_nonatomic_unknownObjectRelease_n(void *ptr, int32_t n);
FUNCTION(NonAtomicUnknownObjectReleaseN, Swift, swift_nonatomic_unknownObjectRelease_n,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_bridgeObjectRetain_n(void *ptr, int32_t n);
FUNCTION(BridgeObjectRetainN, Swift, swift_bridgeObjectRetain_n,
C_CC, AlwaysAvailable,
RETURNS(BridgeObjectPtrTy),
ARGS(BridgeObjectPtrTy, Int32Ty),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_bridgeObjectRelease_n(void *ptr, int32_t n);
FUNCTION(BridgeObjectReleaseN, Swift, swift_bridgeObjectRelease_n,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(BridgeObjectPtrTy, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_nonatomic_bridgeObjectRetain_n(void *ptr, int32_t n);
FUNCTION(NonAtomicBridgeObjectRetainN, Swift, swift_nonatomic_bridgeObjectRetain_n,
C_CC, AlwaysAvailable,
RETURNS(BridgeObjectPtrTy),
ARGS(BridgeObjectPtrTy, Int32Ty),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_nonatomic_bridgeObjectRelease_n(void *ptr, int32_t n);
FUNCTION(NonAtomicBridgeObjectReleaseN, Swift, swift_nonatomic_bridgeObjectRelease_n,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(BridgeObjectPtrTy, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_nonatomic_retain(void *ptr);
FUNCTION(NativeNonAtomicStrongRetain, Swift, swift_nonatomic_retain,
C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, FirstParamReturned, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_nonatomic_release(void *ptr);
FUNCTION(NativeNonAtomicStrongRelease, Swift, swift_nonatomic_release,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_tryRetain(void *ptr);
FUNCTION(NativeTryRetain, Swift, swift_tryRetain, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Locking),
UNKNOWN_MEMEFFECTS)
// bool swift_isDeallocating(void *ptr);
FUNCTION(IsDeallocating, Swift, swift_isDeallocating, C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void *swift_unknownObjectRetain(void *ptr);
FUNCTION(UnknownObjectRetain, Swift, swift_unknownObjectRetain, C_CC, AlwaysAvailable,
RETURNS(UnknownRefCountedPtrTy),
ARGS(UnknownRefCountedPtrTy),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_unknownObjectRelease(void *ptr);
FUNCTION(UnknownObjectRelease, Swift, swift_unknownObjectRelease,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(UnknownRefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_nonatomic_unknownObjectRetain(void *ptr);
FUNCTION(NonAtomicUnknownObjectRetain, Swift, swift_nonatomic_unknownObjectRetain,
C_CC, AlwaysAvailable,
RETURNS(UnknownRefCountedPtrTy),
ARGS(UnknownRefCountedPtrTy),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_nonatomic_unknownObjectRelease(void *ptr);
FUNCTION(NonAtomicUnknownObjectRelease, Swift, swift_nonatomic_unknownObjectRelease,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(UnknownRefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_bridgeObjectRetain(void *ptr);
FUNCTION(BridgeObjectStrongRetain, Swift, swift_bridgeObjectRetain,
C_CC, AlwaysAvailable,
RETURNS(BridgeObjectPtrTy),
ARGS(BridgeObjectPtrTy),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_bridgeRelease(void *ptr);
FUNCTION(BridgeObjectStrongRelease, Swift, swift_bridgeObjectRelease,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(BridgeObjectPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_bridgeObjectRetainDirect(void *ptr);
FUNCTION(BridgeObjectStrongRetainDirect, Swift, swift_bridgeObjectRetainDirect,
SwiftDirectRR_CC, AlwaysAvailable,
RETURNS(BridgeObjectPtrTy),
ARGS(BridgeObjectPtrTy),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void *swift_bridgeObjectReleaseDirect(void *ptr);
FUNCTION(BridgeObjectStrongReleaseDirect, Swift, swift_bridgeObjectReleaseDirect,
SwiftDirectRR_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(BridgeObjectPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_nonatomic_bridgeObjectRetain(void *ptr);
FUNCTION(NonAtomicBridgeObjectStrongRetain, Swift, swift_nonatomic_bridgeObjectRetain,
C_CC, AlwaysAvailable,
RETURNS(BridgeObjectPtrTy),
ARGS(BridgeObjectPtrTy),
ATTRS(NoUnwind, FirstParamReturned),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_nonatomic_bridgeRelease(void *ptr);
FUNCTION(NonAtomicBridgeObjectStrongRelease,
Swift, swift_nonatomic_bridgeObjectRelease,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(BridgeObjectPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// error *swift_errorRetain(error *ptr);
FUNCTION(ErrorStrongRetain, Swift, swift_errorRetain,
C_CC, AlwaysAvailable,
RETURNS(ErrorPtrTy),
ARGS(ErrorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_errorRelease(void *ptr);
FUNCTION(ErrorStrongRelease, Swift, swift_errorRelease,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ErrorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
#define NEVER_LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, Nativeness, SymName, UnknownPrefix) \
/* void swift_##SymName##Destroy(Name##Reference *object); */ \
FUNCTION(Nativeness##Name##Destroy, Swift, swift_##SymName##Destroy, \
C_CC, AlwaysAvailable, \
RETURNS(VoidTy), \
ARGS(Name##ReferencePtrTy), \
ATTRS(NoUnwind), \
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating), \
UNKNOWN_MEMEFFECTS) \
/* void swift_##SymName##Init(Name##Reference *object, void *value); */ \
FUNCTION(Nativeness##Name##Init, Swift, swift_##SymName##Init, \
C_CC, AlwaysAvailable, \
RETURNS(Name##ReferencePtrTy), \
ARGS(Name##ReferencePtrTy, UnknownPrefix##RefCountedPtrTy), \
ATTRS(NoUnwind, FirstParamReturned, WillReturn), \
EFFECT(RuntimeEffect::NoEffect), \
UNKNOWN_MEMEFFECTS) \
/* Name##Reference *swift_##SymName##Assign(Name##Reference *object, void *value); */ \
FUNCTION(Nativeness##Name##Assign, Swift, swift_##SymName##Assign, \
C_CC, AlwaysAvailable, \
RETURNS(Name##ReferencePtrTy), \
ARGS(Name##ReferencePtrTy, UnknownPrefix##RefCountedPtrTy), \
ATTRS(NoUnwind, FirstParamReturned), \
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating), \
UNKNOWN_MEMEFFECTS) \
/* void *swift_##SymName##Load(Name##Reference *object); */ \
FUNCTION(Nativeness##Name##LoadStrong, Swift, swift_##SymName##LoadStrong, \
C_CC, AlwaysAvailable, \
RETURNS(UnknownPrefix##RefCountedPtrTy), \
ARGS(Name##ReferencePtrTy), \
ATTRS(NoUnwind, WillReturn), \
EFFECT(RuntimeEffect::NoEffect), \
UNKNOWN_MEMEFFECTS) \
/* void *swift_##SymName##Take(Name##Reference *object); */ \
FUNCTION(Nativeness##Name##TakeStrong, Swift, swift_##SymName##TakeStrong, \
C_CC, AlwaysAvailable, \
RETURNS(UnknownPrefix##RefCountedPtrTy), \
ARGS(Name##ReferencePtrTy), \
ATTRS(NoUnwind, WillReturn), \
EFFECT(RuntimeEffect::NoEffect), \
UNKNOWN_MEMEFFECTS) \
/* Name##Reference *swift_##SymName##CopyInit(Name##Reference *dest, Name##Reference *src); */ \
FUNCTION(Nativeness##Name##CopyInit, Swift, swift_##SymName##CopyInit, \
C_CC, AlwaysAvailable, \
RETURNS(Name##ReferencePtrTy), \
ARGS(Name##ReferencePtrTy, Name##ReferencePtrTy), \
ATTRS(NoUnwind, FirstParamReturned, WillReturn), \
EFFECT(RuntimeEffect::RefCounting), \
UNKNOWN_MEMEFFECTS) \
/* void *swift_##SymName##TakeInit(Name##Reference *dest, Name##Reference *src); */ \
FUNCTION(Nativeness##Name##TakeInit, Swift, swift_##SymName##TakeInit, \
C_CC, AlwaysAvailable, \
RETURNS(Name##ReferencePtrTy), \
ARGS(Name##ReferencePtrTy, Name##ReferencePtrTy), \
ATTRS(NoUnwind, FirstParamReturned, WillReturn), \
EFFECT(RuntimeEffect::NoEffect), \
UNKNOWN_MEMEFFECTS) \
/* Name##Reference *swift_##SymName##CopyAssign(Name##Reference *dest, Name##Reference *src); */ \
FUNCTION(Nativeness##Name##CopyAssign, Swift, swift_##SymName##CopyAssign, \
C_CC, AlwaysAvailable, \
RETURNS(Name##ReferencePtrTy), \
ARGS(Name##ReferencePtrTy, Name##ReferencePtrTy), \
ATTRS(NoUnwind, FirstParamReturned), \
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating), \
UNKNOWN_MEMEFFECTS) \
/* Name##Reference *swift_##SymName##TakeAssign(Name##Reference *dest, Name##Reference *src); */ \
FUNCTION(Nativeness##Name##TakeAssign, Swift, swift_##SymName##TakeAssign, \
C_CC, AlwaysAvailable, \
RETURNS(Name##ReferencePtrTy), \
ARGS(Name##ReferencePtrTy, Name##ReferencePtrTy), \
ATTRS(NoUnwind, FirstParamReturned), \
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating), \
UNKNOWN_MEMEFFECTS)
#define NEVER_LOADABLE_CHECKED_REF_STORAGE(Name, name, ...) \
NEVER_LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, Native, name, ) \
NEVER_LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, Unknown, unknownObject##Name, Unknown)
#define LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, name, Prefix, prefix) \
/* void *swift_##prefix##name##Retain(void *ptr); */ \
FUNCTION(Prefix##Name##Retain, Swift, swift_##prefix##name##Retain, \
C_CC, AlwaysAvailable, \
RETURNS(RefCountedPtrTy), \
ARGS(RefCountedPtrTy), \
ATTRS(NoUnwind, FirstParamReturned, WillReturn), \
EFFECT(RuntimeEffect::RefCounting), \
UNKNOWN_MEMEFFECTS) \
/* void swift_##prefix##name##Release(void *ptr); */ \
FUNCTION(Prefix##Name##Release, Swift, swift_##prefix##name##Release, \
C_CC, AlwaysAvailable, \
RETURNS(VoidTy), \
ARGS(RefCountedPtrTy), \
ATTRS(NoUnwind), \
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating), \
UNKNOWN_MEMEFFECTS) \
/* void *swift_##prefix##name##RetainStrong(void *ptr); */ \
FUNCTION(Prefix##StrongRetain##Name, Swift, swift_##prefix##name##RetainStrong, \
C_CC, AlwaysAvailable, \
RETURNS(RefCountedPtrTy), \
ARGS(RefCountedPtrTy), \
ATTRS(NoUnwind, FirstParamReturned, WillReturn), \
EFFECT(RuntimeEffect::RefCounting), \
UNKNOWN_MEMEFFECTS) \
/* void swift_##prefix##name##RetainStrongAndRelease(void *ptr); */ \
FUNCTION(Prefix##StrongRetainAnd##Name##Release, \
Swift, swift_##prefix##name##RetainStrongAndRelease, \
C_CC, AlwaysAvailable, \
RETURNS(VoidTy), \
ARGS(RefCountedPtrTy), \
ATTRS(NoUnwind), \
EFFECT(RuntimeEffect::RefCounting), \
UNKNOWN_MEMEFFECTS)
#define SOMETIMES_LOADABLE_CHECKED_REF_STORAGE(Name, name, ...) \
NEVER_LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, Unknown, unknownObject##Name, Unknown) \
LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, name, Native, ) \
LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, name, NonAtomicNative, nonatomic_)
#define ALWAYS_LOADABLE_CHECKED_REF_STORAGE(Name, name, ...) \
LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, name, Native, ) \
LOADABLE_CHECKED_REF_STORAGE_HELPER(Name, name, NonAtomicNative, nonatomic_)
#include "swift/AST/ReferenceStorage.def"
#undef NEVER_LOADABLE_CHECKED_REF_STORAGE_HELPER
#undef LOADABLE_CHECKED_REF_STORAGE_HELPER
// bool swift_isUniquelyReferencedNonObjC(const void *);
FUNCTION(IsUniquelyReferencedNonObjC, Swift, swift_isUniquelyReferencedNonObjC,
C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(UnknownRefCountedPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// bool swift_isUniquelyReferencedNonObjC_nonNull(const void *);
FUNCTION(IsUniquelyReferencedNonObjC_nonNull,
Swift, swift_isUniquelyReferencedNonObjC_nonNull,
C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(UnknownRefCountedPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// bool swift_isUniquelyReferencedNonObjC_nonNull_bridgeObject(
// uintptr_t bits);
FUNCTION(IsUniquelyReferencedNonObjC_nonNull_bridgeObject,
Swift, swift_isUniquelyReferencedNonObjC_nonNull_bridgeObject,
C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(BridgeObjectPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// bool swift_isUniquelyReferenced(const void *);
FUNCTION(IsUniquelyReferenced, Swift, swift_isUniquelyReferenced,
C_CC, ObjCIsUniquelyReferencedAvailability,
RETURNS(Int1Ty),
ARGS(UnknownRefCountedPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// bool swift_isUniquelyReferenced_nonNull(const void *);
FUNCTION(IsUniquelyReferenced_nonNull,
Swift, swift_isUniquelyReferenced_nonNull,
C_CC, ObjCIsUniquelyReferencedAvailability,
RETURNS(Int1Ty),
ARGS(UnknownRefCountedPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// bool swift_isUniquelyReferenced_nonNull_bridgeObject(
// uintptr_t bits);
FUNCTION(IsUniquelyReferenced_nonNull_bridgeObject,
Swift, swift_isUniquelyReferenced_nonNull_bridgeObject,
C_CC, ObjCIsUniquelyReferencedAvailability,
RETURNS(Int1Ty),
ARGS(BridgeObjectPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// bool swift_isUniquelyReferenced_native(const struct HeapObject *);
FUNCTION(IsUniquelyReferenced_native, Swift, swift_isUniquelyReferenced_native,
C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// bool swift_isUniquelyReferenced_nonNull_native(const struct HeapObject *);
FUNCTION(IsUniquelyReferenced_nonNull_native,
Swift, swift_isUniquelyReferenced_nonNull_native,
C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind, ZExt, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// bool swift_isEscapingClosureAtFileLocation(const struct HeapObject *object,
// const unsigned char *filename,
// int32_t filenameLength,
// int32_t line,
// int32_t col,
// unsigned type);
FUNCTION(IsEscapingClosureAtFileLocation, Swift, swift_isEscapingClosureAtFileLocation,
C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(RefCountedPtrTy, Int8PtrTy, Int32Ty, Int32Ty, Int32Ty, Int32Ty),
ATTRS(NoUnwind, ZExt),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_arrayInitWithCopy(opaque*, opaque*, size_t, type*);
FUNCTION(ArrayInitWithCopy, Swift, swift_arrayInitWithCopy,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_arrayInitWithTakeNoAlias(opaque*, opaque*, size_t, type*);
FUNCTION(ArrayInitWithTakeNoAlias, Swift, swift_arrayInitWithTakeNoAlias,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_arrayInitWithTakeFrontToBack(opaque*, opaque*, size_t, type*);
FUNCTION(ArrayInitWithTakeFrontToBack, Swift, swift_arrayInitWithTakeFrontToBack,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_arrayInitWithTakeBackToFront(opaque*, opaque*, size_t, type*);
FUNCTION(ArrayInitWithTakeBackToFront, Swift, swift_arrayInitWithTakeBackToFront,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_arrayAssignWithCopyNoAlias(opaque*, opaque*, size_t, type*);
FUNCTION(ArrayAssignWithCopyNoAlias, Swift, swift_arrayAssignWithCopyNoAlias,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_arrayAssignWithCopyFrontToBack(opaque*, opaque*, size_t, type*);
FUNCTION(ArrayAssignWithCopyFrontToBack, Swift, swift_arrayAssignWithCopyFrontToBack,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_arrayAssignWithCopyBackToFront(opaque*, opaque*, size_t, type*);
FUNCTION(ArrayAssignWithCopyBackToFront, Swift, swift_arrayAssignWithCopyBackToFront,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_arrayAssignWithTake(opaque*, opaque*, size_t, type*);
FUNCTION(ArrayAssignWithTake, Swift, swift_arrayAssignWithTake, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void swift_arrayDestroy(opaque*, size_t, type*);
FUNCTION(ArrayDestroy, Swift, swift_arrayDestroy, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// Metadata *swift_getFunctionTypeMetadata(unsigned long flags,
// const Metadata **parameters,
// const uint32_t *parameterFlags,
// const Metadata *result);
FUNCTION(GetFunctionMetadata, Swift, swift_getFunctionTypeMetadata,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy, PtrTy, PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *
// swift_getFunctionTypeMetadataDifferentiable(unsigned long flags,
// unsigned long diffKind,
// const Metadata **parameters,
// const uint32_t *parameterFlags,
// const Metadata *result);
FUNCTION(GetFunctionMetadataDifferentiable,
Swift, swift_getFunctionTypeMetadataDifferentiable,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy, SizeTy, PtrTy, PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *
// swift_getExtendedFunctionTypeMetadata(unsigned long flags,
// unsigned long diffKind,
// const Metadata **parameters,
// const uint32_t *parameterFlags,
// const Metadata *result,
// const Metadata *globalActor,
// uint32_t extendedflags,
// const Metadata *thrownError);
FUNCTION(GetFunctionMetadataExtended,
Swift, swift_getExtendedFunctionTypeMetadata,
C_CC, TypedThrowsAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy,
SizeTy,
PtrTy,
PtrTy,
TypeMetadataPtrTy,
TypeMetadataPtrTy,
Int32Ty,
TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *
// swift_getFunctionTypeMetadataGlobalActor(unsigned long flags,
// unsigned long diffKind,
// const Metadata **parameters,
// const uint32_t *parameterFlags,
// const Metadata *result,
// const Metadata *globalActor);
FUNCTION(GetFunctionMetadataGlobalActor,
Swift, swift_getFunctionTypeMetadataGlobalActor,
C_CC, ConcurrencyAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy,
SizeTy,
PtrTy,
PtrTy,
TypeMetadataPtrTy,
TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *
// swift_getFunctionTypeMetadataGlobalActorBackDeploy(unsigned long flags,
// unsigned long diffKind,
// const Metadata **parameters,
// const uint32_t *parameterFlags,
// const Metadata *result,
// const Metadata *globalActor);
FUNCTION(GetFunctionMetadataGlobalActorBackDeploy,
Swift, swift_getFunctionTypeMetadataGlobalActorBackDeploy,
C_CC, OpaqueTypeAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy,
SizeTy,
PtrTy,
PtrTy,
TypeMetadataPtrTy,
TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *swift_getFunctionTypeMetadata0(unsigned long flags,
// const Metadata *resultMetadata);
FUNCTION(GetFunctionMetadata0, Swift, swift_getFunctionTypeMetadata0,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadNone))
// Metadata *swift_getFunctionTypeMetadata1(unsigned long flags,
// const Metadata *arg0,
// const Metadata *resultMetadata);
FUNCTION(GetFunctionMetadata1, Swift, swift_getFunctionTypeMetadata1,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy, TypeMetadataPtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadNone))
// Metadata *swift_getFunctionTypeMetadata2(unsigned long flags,
// const Metadata *arg0,
// const Metadata *arg1,
// const Metadata *resultMetadata);
FUNCTION(GetFunctionMetadata2, Swift, swift_getFunctionTypeMetadata2,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy, TypeMetadataPtrTy, TypeMetadataPtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadNone))
// Metadata *swift_getFunctionTypeMetadata3(unsigned long flags,
// const Metadata *arg0,
// const Metadata *arg1,
// const Metadata *arg2,
// const Metadata *resultMetadata);
FUNCTION(GetFunctionMetadata3, Swift, swift_getFunctionTypeMetadata3,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy, TypeMetadataPtrTy, TypeMetadataPtrTy, TypeMetadataPtrTy,
TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadNone))
// Metadata *swift_getForeignTypeMetadata(Metadata *nonUnique);
FUNCTION(GetForeignTypeMetadata, Swift, swift_getForeignTypeMetadata,
SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadNone)) // only writes to runtime-private fields
// SWIFT_RUNTIME_EXPORT
// SWIFT_CC(swift)
// bool swift_compareTypeContextDescriptors(const TypeContextDescriptor *lhs,
// const TypeContextDescriptor *rhs);
FUNCTION(CompareTypeContextDescriptors,
Swift, swift_compareTypeContextDescriptors, SwiftCC,
CompareTypeContextDescriptorsAvailability,
RETURNS(Int1Ty),
ARGS(TypeContextDescriptorPtrTy,
TypeContextDescriptorPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect), // ?
MEMEFFECTS(ReadNone))
// MetadataResponse swift_getSingletonMetadata(MetadataRequest request,
// TypeContextDescriptor *type);
FUNCTION(GetSingletonMetadata, Swift, swift_getSingletonMetadata,
SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, TypeContextDescriptorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadNone))
// MetadataResponse swift_getGenericMetadata(MetadataRequest request,
// const void * const *arguments,
// TypeContextDescriptor *type);
FUNCTION(GetGenericMetadata, Swift, swift_getGenericMetadata,
SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, Int8PtrTy, TypeContextDescriptorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// MetadataResponse swift_getCanonicalSpecializedMetadata(MetadataRequest request,
// Metadata *candidate);
FUNCTION(GetCanonicalSpecializedMetadata, Swift, swift_getCanonicalSpecializedMetadata,
SwiftCC, GetCanonicalSpecializedMetadataAvailability,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, TypeMetadataPtrTy, TypeMetadataPtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// MetadataResponse
// swift_getCanonicalPrespecializedGenericMetadata(MetadataRequest request,
// const void * const *arguments,
// const TypeContextDescriptor *description,
// swift_once_t *cachedFlag)
FUNCTION(GetCanonicalPrespecializedGenericMetadata,
Swift, swift_getCanonicalPrespecializedGenericMetadata,
SwiftCC, GetCanonicalPrespecializedGenericMetadataAvailability,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, Int8PtrTy, TypeContextDescriptorPtrTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// MetadataResponse swift_getOpaqueTypeMetadata(MetadataRequest request,
// const void * const *arguments,
// const void *descriptor,
// uintptr_t index);
FUNCTION(GetOpaqueTypeMetadata, Swift, swift_getOpaqueTypeMetadata,
SwiftCC, OpaqueTypeAvailability,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, Int8PtrTy, OpaqueTypeDescriptorPtrTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// MetadataResponse swift_getOpaqueTypeMetadata2(MetadataRequest request,
// const void * const *arguments,
// const OpaqueTypeDescriptor *descriptor,
// uintptr_t index);
FUNCTION(GetOpaqueTypeMetadata2, Swift, swift_getOpaqueTypeMetadata2,
SwiftCC, SignedDescriptorAvailability,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, Int8PtrTy, OpaqueTypeDescriptorPtrTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// const WitnessTable *swift_getOpaqueTypeConformance(const void * const *arguments,
// const OpaqueTypeDescriptor *descriptor,
// uintptr_t index);
FUNCTION(GetOpaqueTypeConformance, Swift, swift_getOpaqueTypeConformance,
SwiftCC, OpaqueTypeAvailability,
RETURNS(WitnessTablePtrTy),
ARGS(Int8PtrTy, OpaqueTypeDescriptorPtrTy, SizeTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// const WitnessTable *swift_getOpaqueTypeConformance2(const void * const *arguments,
// const OpaqueTypeDescriptor *descriptor,
// uintptr_t index);
FUNCTION(GetOpaqueTypeConformance2, Swift, swift_getOpaqueTypeConformance2,
SwiftCC, SignedDescriptorAvailability,
RETURNS(WitnessTablePtrTy),
ARGS(Int8PtrTy, OpaqueTypeDescriptorPtrTy, SizeTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *swift_allocateGenericClassMetadata(ClassDescriptor *type,
// const void * const *arguments,
// const void *template);
FUNCTION(AllocateGenericClassMetadata, Swift, swift_allocateGenericClassMetadata,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeContextDescriptorPtrTy, Int8PtrPtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// Metadata *swift_cvw_allocateGenericClassMetadataWithLayoutString(
// ClassDescriptor *type,
// const void * const *arguments,
// const void *template);
FUNCTION(AllocateGenericClassMetadataWithLayoutString,
Swift, swift_cvw_allocateGenericClassMetadataWithLayoutString,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeContextDescriptorPtrTy, Int8PtrPtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// Metadata *swift_allocateGenericValueMetadata(ValueTypeDescriptor *type,
// const void * const *arguments,
// const void *template,
// size_t extraSize);
FUNCTION(AllocateGenericValueMetadata, Swift, swift_allocateGenericValueMetadata,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeContextDescriptorPtrTy, Int8PtrPtrTy, Int8PtrTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// Metadata *swift_cvw_allocateGenericValueMetadataWithLayoutString(
// ValueTypeDescriptor *type,
// const void * const *arguments,
// const void *template,
// size_t extraSize);
FUNCTION(AllocateGenericValueMetadataWithLayoutString,
Swift, swift_cvw_allocateGenericValueMetadataWithLayoutString,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeContextDescriptorPtrTy, Int8PtrPtrTy, Int8PtrTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// MetadataResponse swift_checkMetadataState(MetadataRequest request,
// const Metadata *type);
FUNCTION(CheckMetadataState, Swift, swift_checkMetadataState,
SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadOnly))
// const ProtocolWitnessTable *
// swift_getWitnessTable(const ProtocolConformanceDescriptor *conf,
// const Metadata *type,
// const void * const *instantiationArgs);
FUNCTION(GetWitnessTable, Swift, swift_getWitnessTable, C_CC, AlwaysAvailable,
RETURNS(WitnessTablePtrTy),
ARGS(ProtocolConformanceDescriptorPtrTy,
TypeMetadataPtrTy,
WitnessTablePtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadOnly))
FUNCTION(GetWitnessTableRelative, Swift, swift_getWitnessTableRelative, C_CC, AlwaysAvailable,
RETURNS(WitnessTablePtrTy),
ARGS(ProtocolConformanceDescriptorPtrTy,
TypeMetadataPtrTy,
WitnessTablePtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadOnly))
// MetadataResponse swift_getAssociatedTypeWitness(
// MetadataRequest request,
// WitnessTable *wtable,
// const Metadata *conformingType,
// ProtocolRequirement *reqBase,
// ProtocolRequirement *assocType);
FUNCTION(GetAssociatedTypeWitness, Swift, swift_getAssociatedTypeWitness,
SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, WitnessTablePtrTy, TypeMetadataPtrTy, PtrTy, PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadNone))
FUNCTION(GetAssociatedTypeWitnessRelative, Swift, swift_getAssociatedTypeWitnessRelative,
SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, WitnessTablePtrTy, TypeMetadataPtrTy, PtrTy, PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadNone))
// SWIFT_RUNTIME_EXPORT SWIFT_CC(swift)
// const WitnessTable *swift_getAssociatedConformanceWitness(
// WitnessTable *wtable,
// const Metadata *conformingType,
// const Metadata *assocType,
// const ProtocolRequirement *reqBase,
// const ProtocolRequirement *assocConformance);
FUNCTION(GetAssociatedConformanceWitness,
Swift, swift_getAssociatedConformanceWitness, SwiftCC, AlwaysAvailable,
RETURNS(WitnessTablePtrTy),
ARGS(WitnessTablePtrTy,
TypeMetadataPtrTy,
TypeMetadataPtrTy,
PtrTy,
PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadNone))
FUNCTION(GetAssociatedConformanceWitnessRelative,
Swift, swift_getAssociatedConformanceWitnessRelative, SwiftCC, AlwaysAvailable,
RETURNS(WitnessTablePtrTy),
ARGS(WitnessTablePtrTy,
TypeMetadataPtrTy,
TypeMetadataPtrTy,
PtrTy,
PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadNone))
// SWIFT_RUNTIME_EXPORT
// SWIFT_CC(swift) bool swift_compareProtocolConformanceDescriptors(
// const ProtocolConformanceDescriptor *lhs,
// const ProtocolConformanceDescriptor *rhs);
FUNCTION(CompareProtocolConformanceDescriptors,
Swift, swift_compareProtocolConformanceDescriptors, SwiftCC,
CompareProtocolConformanceDescriptorsAvailability,
RETURNS(Int1Ty),
ARGS(ProtocolConformanceDescriptorPtrTy,
ProtocolConformanceDescriptorPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect), // ?
MEMEFFECTS(ReadNone))
// SWIFT_RUNTIME_EXPORT SWIFT_CC(swift)
// const Metadata * const *
// swift_allocateMetadataPack(const Metadata * const *ptr, size_t count);
FUNCTION(AllocateMetadataPack,
Swift, swift_allocateMetadataPack, SwiftCC,
AlwaysAvailable, // FIXME
RETURNS(TypeMetadataPtrPtrTy),
ARGS(TypeMetadataPtrPtrTy, SizeTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
UNKNOWN_MEMEFFECTS)
// SWIFT_RUNTIME_EXPORT SWIFT_CC(swift)
// const WitnessTable * const *
// swift_allocateWitnessTablePack(const WitnessTable * const *ptr, size_t count);
FUNCTION(AllocateWitnessTablePack,
Swift, swift_allocateWitnessTablePack, SwiftCC,
AlwaysAvailable, // FIXME
RETURNS(WitnessTablePtrPtrTy),
ARGS(WitnessTablePtrPtrTy, SizeTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
UNKNOWN_MEMEFFECTS)
// Metadata *swift_getMetatypeMetadata(Metadata *instanceTy);
FUNCTION(GetMetatypeMetadata, Swift, swift_getMetatypeMetadata, C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadNone))
// Metadata *swift_getExistentialMetatypeMetadata(Metadata *instanceTy);
FUNCTION(GetExistentialMetatypeMetadata,
Swift, swift_getExistentialMetatypeMetadata, C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadNone))
// Metadata *swift_getObjCClassMetadata(objc_class *theClass);
FUNCTION(GetObjCClassMetadata, Swift, swift_getObjCClassMetadata,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(ObjCClassPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadNone))
// Metadata *swift_getObjCClassFromMetadata(objc_class *theClass);
FUNCTION(GetObjCClassFromMetadata, Swift, swift_getObjCClassFromMetadata,
C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect), // ?
MEMEFFECTS(ReadNone))
// Metadata *swift_getObjCClassFromObject(id object);
// This reads object metadata so cannot be marked ReadNone.
FUNCTION(GetObjCClassFromObject, Swift, swift_getObjCClassFromObject,
C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(ObjCPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect), // ?
MEMEFFECTS(ArgMemReadOnly))
// MetadataResponse swift_getTupleTypeMetadata(MetadataRequest request,
// TupleTypeFlags flags,
// Metadata * const *elts,
// const char *labels,
// value_witness_table_t *proposed);
FUNCTION(GetTupleMetadata, Swift, swift_getTupleTypeMetadata, SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, SizeTy, PtrTy, Int8PtrTy, WitnessTablePtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// MetadataResponse swift_getTupleTypeMetadata2(MetadataRequest request,
// Metadata *elt0, Metadata *elt1,
// const char *labels,
// value_witness_table_t *proposed);
FUNCTION(GetTupleMetadata2, Swift, swift_getTupleTypeMetadata2, SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, TypeMetadataPtrTy, TypeMetadataPtrTy,
Int8PtrTy, WitnessTablePtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// MetadataResponse swift_getTupleTypeMetadata3(MetadataRequest request,
// Metadata *elt0, Metadata *elt1,
// Metadata *elt2,
// const char *labels,
// value_witness_table_t *proposed);
FUNCTION(GetTupleMetadata3, Swift, swift_getTupleTypeMetadata3, SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, TypeMetadataPtrTy, TypeMetadataPtrTy, TypeMetadataPtrTy,
Int8PtrTy, WitnessTablePtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// void swift_getTupleTypeLayout(TypeLayout *result,
// uint32_t offsets,
// TupleTypeFlags flags,
// const TypeLayout * const *elts);
FUNCTION(GetTupleLayout, Swift, swift_getTupleTypeLayout, SwiftCC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(PtrTy, PtrTy, SizeTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// size_t swift_getTupleTypeLayout2(TypeLayout *layout,
// const TypeLayout *elt0,
// const TypeLayout *elt1);
FUNCTION(GetTupleLayout2, Swift, swift_getTupleTypeLayout2, SwiftCC, AlwaysAvailable,
RETURNS(SizeTy),
ARGS(PtrTy, Int8PtrPtrTy, Int8PtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// OffsetPair swift_getTupleTypeLayout3(TypeLayout *layout,
// const TypeLayout *elt0,
// const TypeLayout *elt1,
// const TypeLayout *elt2);
FUNCTION(GetTupleLayout3, Swift, swift_getTupleTypeLayout3, SwiftCC, AlwaysAvailable,
RETURNS(OffsetPairTy),
ARGS(PtrTy, Int8PtrPtrTy, Int8PtrPtrTy, Int8PtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// MetadataResponse swift_getFixedArrayTypeMetadata(MetadataRequest request,
// intptr_t size,
// Metadata *elt);
FUNCTION(GetFixedArrayTypeMetadata, Swift, swift_getFixedArrayTypeMetadata, SwiftCC,
ValueGenericTypeAvailability,
RETURNS(TypeMetadataResponseTy),
ARGS(SizeTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *swift_getExistentialTypeMetadata(
// ProtocolClassConstraint classConstraint,
// const Metadata *superclassConstraint,
// size_t numProtocols,
// const ProtocolDescriptorRef *protocols);
//
// Note: ProtocolClassConstraint::Class is 0, ::Any is 1.
FUNCTION(GetExistentialMetadata,
Swift, swift_getExistentialTypeMetadata,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(Int1Ty, TypeMetadataPtrTy, SizeTy, PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ReadOnly))
// const ExtendedExistentialTypeShape *
// swift_getExtendedExistentialTypeShape(
// const NonUniqueExtendedExistentialTypeShape *nonUnique);
FUNCTION(GetExtendedExistentialTypeShape,
Swift, swift_getExtendedExistentialTypeShape, C_CC,
ParameterizedExistentialAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(Int8PtrTy, Int8PtrPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ArgMemOnly))
// Metadata *swift_getExtendedExistentialTypeMetadata(
// const NonUniqueExtendedExistentialTypeShape *shape,
// const void * const *generalizationArgs);
FUNCTION(GetExtendedExistentialTypeMetadata,
Swift, swift_getExtendedExistentialTypeMetadata, C_CC,
ParameterizedExistentialAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(Int8PtrTy, Int8PtrPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ArgMemOnly))
// Metadata *swift_getExtendedExistentialTypeMetadata_unique(
// const ExtendedExistentialTypeShape *shape,
// const void * const *generalizationArgs);
FUNCTION(GetExtendedExistentialTypeMetadataUnique,
Swift, swift_getExtendedExistentialTypeMetadata_unique, C_CC,
ParameterizedExistentialAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(Int8PtrTy, Int8PtrPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData), // ?
MEMEFFECTS(ArgMemOnly))
// Metadata *swift_relocateClassMetadata(TypeContextDescriptor *descriptor,
// const void *pattern);
FUNCTION(RelocateClassMetadata,
Swift, swift_relocateClassMetadata, C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeContextDescriptorPtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_initClassMetadata(Metadata *self,
// ClassLayoutFlags flags,
// size_t numFields,
// TypeLayout * const *fieldTypes,
// size_t *fieldOffsets);
FUNCTION(InitClassMetadata,
Swift, swift_initClassMetadata, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy, PtrTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_updateClassMetadata(Metadata *self,
// ClassLayoutFlags flags,
// size_t numFields,
// TypeLayout * const *fieldTypes,
// size_t *fieldOffsets);
FUNCTION(UpdateClassMetadata,
Swift, swift_updateClassMetadata, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy, PtrTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// MetadataDependency swift_initClassMetadata2(Metadata *self,
// ClassLayoutFlags flags,
// size_t numFields,
// TypeLayout * const *fieldTypes,
// size_t *fieldOffsets);
FUNCTION(InitClassMetadata2,
Swift, swift_initClassMetadata2, SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataDependencyTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy, PtrTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// MetadataDependency swift_updateClassMetadata2(Metadata *self,
// ClassLayoutFlags flags,
// size_t numFields,
// TypeLayout * const *fieldTypes,
// size_t *fieldOffsets);
FUNCTION(UpdateClassMetadata2,
Swift, swift_updateClassMetadata2, SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataDependencyTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy, PtrTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// objc_class *swift_updatePureObjCClassMetadata(
// objc_class *self,
// ClassLayoutFlags flags,
// size_t numFields,
// TypeLayout * const *fieldTypes);
FUNCTION(UpdatePureObjCClassMetadata,
Swift, swift_updatePureObjCClassMetadata, SwiftCC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(ObjCClassPtrTy, SizeTy, SizeTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void *swift_lookUpClassMethod(Metadata *metadata,
// ClassDescriptor *description,
// MethodDescriptor *method);
FUNCTION(LookUpClassMethod,
Swift, swift_lookUpClassMethod, C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(TypeMetadataPtrTy, PtrTy, TypeContextDescriptorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_initStructMetadata(Metadata *structType,
// StructLayoutFlags flags,
// size_t numFields,
// TypeLayout * const *fieldTypes,
// uint32_t *fieldOffsets);
FUNCTION(InitStructMetadata,
Swift, swift_initStructMetadata, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy, PtrTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_initStructMetadataWithLayoutString(Metadata *structType,
// StructLayoutFlags flags,
// size_t numFields,
// uint8_t * const *fieldTypes,
// const uint8_t *fieldTags
// uint32_t *fieldOffsets);
FUNCTION(InitStructMetadataWithLayoutString,
Swift, swift_cvw_initStructMetadataWithLayoutString, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy, PtrTy, Int8PtrTy, PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_initEnumMetadataSingleCase(Metadata *enumType,
// EnumLayoutFlags flags,
// TypeLayout *payload);
FUNCTION(InitEnumMetadataSingleCase,
Swift, swift_initEnumMetadataSingleCase,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, Int8PtrPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_initEnumMetadataSingleCaseWithLayoutString(Metadata *enumType,
// EnumLayoutFlags flags,
// Metadata *payload);
FUNCTION(InitEnumMetadataSingleCaseWithLayoutString,
Swift, swift_cvw_initEnumMetadataSingleCaseWithLayoutString,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_initEnumMetadataSinglePayload(Metadata *enumType,
// EnumLayoutFlags flags,
// TypeLayout *payload,
// unsigned num_empty_cases);
FUNCTION(InitEnumMetadataSinglePayload,
Swift, swift_initEnumMetadataSinglePayload,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, Int8PtrPtrTy, Int32Ty),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_initEnumMetadataSinglePayloadWithLayoutString(Metadata *enumType,
// EnumLayoutFlags flags,
// Metadata *payload,
// unsigned num_empty_cases);
FUNCTION(InitEnumMetadataSinglePayloadWithLayoutString,
Swift, swift_cvw_initEnumMetadataSinglePayloadWithLayoutString,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, TypeMetadataPtrTy, Int32Ty),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_initEnumMetadataMultiPayload(Metadata *enumType,
// EnumLayoutFlags layoutFlags,
// size_t numPayloads,
// TypeLayout * const *payloadTypes);
FUNCTION(InitEnumMetadataMultiPayload,
Swift, swift_initEnumMetadataMultiPayload,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy, PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void
// swift_cvw_initEnumMetadataMultiPayloadWithLayoutString(Metadata *enumType,
// EnumLayoutFlags layoutFlags,
// size_t numPayloads,
// Metadata * const *payloadTypes);
FUNCTION(InitEnumMetadataMultiPayloadWithLayoutString,
Swift, swift_cvw_initEnumMetadataMultiPayloadWithLayoutString,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, SizeTy, TypeMetadataPtrPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// int swift_getEnumCaseMultiPayload(opaque_t *obj, Metadata *enumTy);
FUNCTION(GetEnumCaseMultiPayload,
Swift, swift_getEnumCaseMultiPayload,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(OpaquePtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
MEMEFFECTS(ReadOnly))
// int swift_getEnumTagSinglePayloadGeneric(opaque_t *obj,
// unsigned num_empty_cases,
// Metadata *payloadType,
// int (*getExtraInhabitantIndex)(opaque_t *obj,
// unsigned numPayloadXI,
// Metadata *payload));
FUNCTION(GetEnumTagSinglePayloadGeneric,
Swift, swift_getEnumTagSinglePayloadGeneric,
SwiftCC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(OpaquePtrTy, Int32Ty, TypeMetadataPtrTy, PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
MEMEFFECTS(ReadOnly))
// void swift_storeEnumTagSinglePayloadGeneric(opaque_t *obj,
// unsigned case_index,
// unsigned num_empty_cases,
// Metadata *payloadType,
// void (*storeExtraInhabitant)(opaque_t *obj,
// unsigned case_index,
// unsigned numPayloadXI,
// Metadata *payload));
FUNCTION(StoreEnumTagSinglePayloadGeneric,
Swift, swift_storeEnumTagSinglePayloadGeneric,
SwiftCC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, Int32Ty, Int32Ty, TypeMetadataPtrTy, PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_storeEnumTagMultiPayload(opaque_t *obj, Metadata *enumTy,
// int case_index);
FUNCTION(StoreEnumTagMultiPayload,
Swift, swift_storeEnumTagMultiPayload,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, TypeMetadataPtrTy, Int32Ty),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// Class object_getClass(id object);
//
// This is readonly instead of readnone because isa-rewriting can have
// a noticeable effect.
FUNCTION(GetObjectClass, objc2, object_getClass, C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(ObjCPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::ObjectiveC),
MEMEFFECTS(ReadOnly))
// id object_dispose(id object);
FUNCTION(ObjectDispose, objc2, object_dispose, C_CC, AlwaysAvailable,
RETURNS(ObjCPtrTy),
ARGS(ObjCPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// Class objc_lookUpClass(const char *name);
FUNCTION(LookUpClass, objc2, objc_lookUpClass, C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadNone))
// Class objc_setSuperclass(Class cls, Class newSuper);
FUNCTION(SetSuperclass, objc2, class_setSuperclass, C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(ObjCClassPtrTy, ObjCClassPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
// Metadata *swift_getObjectType(id object);
FUNCTION(GetObjectType, Swift, swift_getObjectType, C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(ObjCPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// Metadata *swift_getDynamicType(opaque_t *obj, Metadata *self);
FUNCTION(GetDynamicType, Swift, swift_getDynamicType, C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(OpaquePtrTy, TypeMetadataPtrTy, Int1Ty),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ReadOnly))
// void *swift_dynamicCastClass(void*, void*);
FUNCTION(DynamicCastClass, Swift, swift_dynamicCastClass, C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// void *swift_dynamicCastClassUnconditional(void*, void*);
FUNCTION(DynamicCastClassUnconditional, Swift, swift_dynamicCastClassUnconditional,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, Int8PtrTy, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// void *swift_dynamicCastObjCClass(void*, void*);
FUNCTION(DynamicCastObjCClass, Swift, swift_dynamicCastObjCClass,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// void *swift_dynamicCastObjCClassUnconditional(void*, void*);
FUNCTION(DynamicCastObjCClassUnconditional,
Swift, swift_dynamicCastObjCClassUnconditional, C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, Int8PtrTy, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// void *swift_dynamicCastUnknownClass(void*, void*);
FUNCTION(DynamicCastUnknownClass, Swift, swift_dynamicCastUnknownClass,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// void *swift_dynamicCastUnknownClassUnconditional(void*, void*);
FUNCTION(DynamicCastUnknownClassUnconditional,
Swift, swift_dynamicCastUnknownClassUnconditional,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, Int8PtrTy, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// type *swift_dynamicCastMetatype(type*, type*);
FUNCTION(DynamicCastMetatype, Swift, swift_dynamicCastMetatype,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeMetadataPtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// type *swift_dynamicCastMetatypeUnconditional(type*, type*);
FUNCTION(DynamicCastMetatypeUnconditional,
Swift, swift_dynamicCastMetatypeUnconditional,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeMetadataPtrTy, TypeMetadataPtrTy, Int8PtrTy, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// objc_class *swift_dynamicCastObjCClassMetatype(objc_class*, objc_class*);
FUNCTION(DynamicCastObjCClassMetatype, Swift, swift_dynamicCastObjCClassMetatype,
C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(ObjCClassPtrTy, ObjCClassPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// objc_class *swift_dynamicCastObjCClassMetatypeUnconditional(objc_class*, objc_class*);
FUNCTION(DynamicCastObjCClassMetatypeUnconditional,
Swift, swift_dynamicCastObjCClassMetatypeUnconditional,
C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(ObjCClassPtrTy, ObjCClassPtrTy, Int8PtrTy, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadOnly))
// bool swift_dynamicCast(opaque*, opaque*, type*, type*, size_t);
FUNCTION(DynamicCast, Swift, swift_dynamicCast, C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(OpaquePtrTy, OpaquePtrTy, TypeMetadataPtrTy, TypeMetadataPtrTy,
SizeTy),
ATTRS(ZExt, NoUnwind),
EFFECT(RuntimeEffect::Casting),
UNKNOWN_MEMEFFECTS)
// type* swift_dynamicCastTypeToObjCProtocolUnconditional(type* object,
// size_t numProtocols,
// Protocol * const *protocols);
FUNCTION(DynamicCastTypeToObjCProtocolUnconditional,
Swift, swift_dynamicCastTypeToObjCProtocolUnconditional,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeMetadataPtrTy, SizeTy, Int8PtrPtrTy, Int8PtrTy, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
UNKNOWN_MEMEFFECTS)
// type* swift_dynamicCastTypeToObjCProtocolConditional(type* object,
// size_t numProtocols,
// Protocol * const *protocols);
FUNCTION(DynamicCastTypeToObjCProtocolConditional,
Swift, swift_dynamicCastTypeToObjCProtocolConditional,
C_CC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(TypeMetadataPtrTy, SizeTy, Int8PtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
UNKNOWN_MEMEFFECTS)
// id swift_dynamicCastObjCProtocolUnconditional(id object,
// size_t numProtocols,
// Protocol * const *protocols);
FUNCTION(DynamicCastObjCProtocolUnconditional,
Swift, swift_dynamicCastObjCProtocolUnconditional, C_CC, AlwaysAvailable,
RETURNS(ObjCPtrTy),
ARGS(ObjCPtrTy, SizeTy, Int8PtrPtrTy, Int8PtrTy, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
UNKNOWN_MEMEFFECTS)
// id swift_dynamicCastObjCProtocolConditional(id object,
// size_t numProtocols,
// Protocol * const *protocols);
FUNCTION(DynamicCastObjCProtocolConditional,
Swift, swift_dynamicCastObjCProtocolConditional, C_CC, AlwaysAvailable,
RETURNS(ObjCPtrTy),
ARGS(ObjCPtrTy, SizeTy, Int8PtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
UNKNOWN_MEMEFFECTS)
// id swift_dynamicCastMetatypeToObjectUnconditional(type *type);
FUNCTION(DynamicCastMetatypeToObjectUnconditional,
Swift, swift_dynamicCastMetatypeToObjectUnconditional, C_CC, AlwaysAvailable,
RETURNS(ObjCPtrTy),
ARGS(TypeMetadataPtrTy, Int8PtrTy, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadNone))
// id swift_dynamicCastMetatypeToObjectConditional(type *type);
FUNCTION(DynamicCastMetatypeToObjectConditional,
Swift, swift_dynamicCastMetatypeToObjectConditional, C_CC, AlwaysAvailable,
RETURNS(ObjCPtrTy),
ARGS(TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadNone))
// witness_table* swift_conformsToProtocol(type*, protocol*);
FUNCTION(ConformsToProtocol,
Swift, swift_conformsToProtocol, C_CC, AlwaysAvailable,
RETURNS(WitnessTablePtrTy),
ARGS(TypeMetadataPtrTy, ProtocolDescriptorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadNone))
// witness_table* swift_conformsToProtocol2(type*, protocol*);
FUNCTION(ConformsToProtocol2,
Swift, swift_conformsToProtocol2, C_CC, SignedConformsToProtocolAvailability,
RETURNS(WitnessTablePtrTy),
ARGS(TypeMetadataPtrTy, ProtocolDescriptorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadNone))
// bool swift_isClassType(type*);
FUNCTION(IsClassType,
Swift, swift_isClassType, C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(TypeMetadataPtrTy),
ATTRS(ZExt, NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadNone))
// bool swift_isOptionalType(type*);
FUNCTION(IsOptionalType,
Swift, swift_isOptionalType, C_CC, AlwaysAvailable,
RETURNS(Int1Ty),
ARGS(TypeMetadataPtrTy),
ATTRS(ZExt, NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Casting),
MEMEFFECTS(ReadNone))
// void swift_once(swift_once_t *predicate,
// void (*function_code)(RefCounted*),
// void *context);
FUNCTION(Once, Swift, swift_once, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(PtrTy, Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Locking),
UNKNOWN_MEMEFFECTS)
// void swift_registerProtocols(const ProtocolRecord *begin,
// const ProtocolRecord *end)
FUNCTION(RegisterProtocols,
Swift, swift_registerProtocols, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ProtocolRecordPtrTy, ProtocolRecordPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Locking),
UNKNOWN_MEMEFFECTS)
// void swift_registerProtocolConformances(const ProtocolConformanceRecord *begin,
// const ProtocolConformanceRecord *end)
FUNCTION(RegisterProtocolConformances,
Swift, swift_registerProtocolConformances, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(RelativeAddressPtrTy, RelativeAddressPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Locking),
UNKNOWN_MEMEFFECTS)
FUNCTION(RegisterTypeMetadataRecords,
Swift, swift_registerTypeMetadataRecords, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataRecordPtrTy, TypeMetadataRecordPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Locking),
UNKNOWN_MEMEFFECTS)
// void swift_beginAccess(void *pointer, ValueBuffer *scratch, size_t flags);
FUNCTION(BeginAccess, Swift, swift_beginAccess, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, PtrTy, SizeTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ExclusivityChecking),
UNKNOWN_MEMEFFECTS)
// void swift_endAccess(ValueBuffer *scratch);
FUNCTION(EndAccess, Swift, swift_endAccess, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ExclusivityChecking),
UNKNOWN_MEMEFFECTS)
FUNCTION(GetOrigOfReplaceable, Swift, swift_getOrigOfReplaceable, C_CC,
DynamicReplacementAvailability,
RETURNS(FunctionPtrTy),
ARGS(PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
FUNCTION(GetReplacement, Swift, swift_getFunctionReplacement, C_CC,
DynamicReplacementAvailability,
RETURNS(FunctionPtrTy),
ARGS(PtrTy, FunctionPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
FUNCTION(InstantiateObjCClass, Swift, swift_instantiateObjCClass,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCAllocWithZone, objc2, objc_allocWithZone,
C_CC, AlwaysAvailable,
RETURNS(ObjCPtrTy), ARGS(ObjCClassPtrTy), ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCMsgSend, objc2, objc_msgSend,
C_CC, AlwaysAvailable,
RETURNS(VoidTy), NO_ARGS, NO_ATTRS, EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCMsgSendStret, objc2, objc_msgSend_stret,
C_CC, AlwaysAvailable,
RETURNS(VoidTy), NO_ARGS, NO_ATTRS, EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCMsgSendSuper, objc2, objc_msgSendSuper,
C_CC, AlwaysAvailable,
RETURNS(VoidTy), NO_ARGS, NO_ATTRS, EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCMsgSendSuperStret, objc2, objc_msgSendSuper_stret,
C_CC, AlwaysAvailable,
RETURNS(VoidTy), NO_ARGS, NO_ATTRS, EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCMsgSendSuper2, objc2, objc_msgSendSuper2,
C_CC, AlwaysAvailable,
RETURNS(VoidTy), NO_ARGS, NO_ATTRS, EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCMsgSendSuperStret2, objc2, objc_msgSendSuper2_stret,
C_CC, AlwaysAvailable,
RETURNS(VoidTy), NO_ARGS, NO_ATTRS, EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCSelRegisterName, objc2, sel_registerName,
C_CC, AlwaysAvailable,
RETURNS(ObjCSELTy), ARGS(Int8PtrTy), ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
MEMEFFECTS(ReadNone))
FUNCTION(ClassReplaceMethod, objc2, class_replaceMethod,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(ObjCClassPtrTy, Int8PtrTy, Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ClassAddProtocol, objc2, class_addProtocol,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ObjCClassPtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCGetClass, objc2, objc_getClass, C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCGetRequiredClass, objc2, objc_getRequiredClass, C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCGetMetaClass, objc2, objc_getMetaClass, C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCClassGetName, objc2, class_getName, C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(ObjCClassPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(GetObjCProtocol, objc2, objc_getProtocol, C_CC, AlwaysAvailable,
RETURNS(ProtocolDescriptorPtrTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(AllocateObjCProtocol, objc2, objc_allocateProtocol, C_CC, AlwaysAvailable,
RETURNS(ProtocolDescriptorPtrTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC, RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(RegisterObjCProtocol, objc2, objc_registerProtocol, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ProtocolDescriptorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ProtocolAddMethodDescription, objc2, protocol_addMethodDescription,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ProtocolDescriptorPtrTy, Int8PtrTy, Int8PtrTy,
ObjCBoolTy, ObjCBoolTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ProtocolAddProtocol, objc2, protocol_addProtocol,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ProtocolDescriptorPtrTy, ProtocolDescriptorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(ObjCOptSelf, objc2, objc_opt_self,
C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(ObjCClassPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC),
UNKNOWN_MEMEFFECTS)
FUNCTION(Malloc, c, malloc, C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(SizeTy),
NO_ATTRS,
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(Free, c, free, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy),
NO_ATTRS,
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(CoroFrameAlloc, Swift, swift_coroFrameAlloc, C_CC,
TypedCoroAllocAvailability,
RETURNS(Int8PtrTy),
ARGS(SizeTy, Int64Ty),
NO_ATTRS,
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
// void *_Block_copy(void *block);
FUNCTION(BlockCopy, BlocksRuntime, _Block_copy, C_CC, AlwaysAvailable,
RETURNS(ObjCBlockPtrTy),
ARGS(ObjCBlockPtrTy),
NO_ATTRS,
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void _Block_release(void *block);
FUNCTION(BlockRelease, BlocksRuntime, _Block_release, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ObjCBlockPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating, RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_deletedMethodError();
FUNCTION(DeletedMethodError, Swift, swift_deletedMethodError, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_deletedAsyncMethodError();
FUNCTION(DeletedAsyncMethodError, _Concurrency, swift_deletedAsyncMethodError, SwiftAsyncCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
FUNCTION(AllocError, Swift, swift_allocError, SwiftCC, AlwaysAvailable,
RETURNS(ErrorPtrTy, OpaquePtrTy),
ARGS(TypeMetadataPtrTy, WitnessTablePtrTy, OpaquePtrTy, Int1Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(DeallocError, Swift, swift_deallocError, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ErrorPtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(GetErrorValue, Swift, swift_getErrorValue, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ErrorPtrTy, Int8PtrPtrTy, OpenedErrorTriplePtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void __tsan_external_write(void *addr, void *caller_pc, void *tag);
// This is a Thread Sanitizer instrumentation entry point in compiler-rt.
FUNCTION(TSanInoutAccess, tsan, __tsan_external_write, C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// int32 __isOSVersionAtLeast(uint32_t major, uint32_t minor, uint32_t patch);
// This a C builtin provided by compiler-rt.
FUNCTION(OSVersionAtLeast, libgcc, __isOSVersionAtLeast,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int32Ty, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// int32 __isPlatformVersionAtLeast(uint32_t platform, uint32_t major,
// uint32_t minor, uint32_t patch);
// This a C builtin provided by compiler-rt.
FUNCTION(PlatformVersionAtLeast, libgcc, __isPlatformVersionAtLeast,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int32Ty, Int32Ty, Int32Ty, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// int32 __isPlatformOrVariantPlatformVersionAtLeast(uint32_t platform1,
// uint32_t major1, uint32_t minor1, uint32_t patch1,
// uint32_t platform2, uint32_t major2, uint32_t minor2,
// uint32_t patch2);
// This is a C builtin provided by compiler-rt.
FUNCTION(TargetOSVersionOrVariantOSVersionAtLeast,
libgcc, __isPlatformOrVariantPlatformVersionAtLeast,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int32Ty, Int32Ty, Int32Ty, Int32Ty, Int32Ty, Int32Ty, Int32Ty,
Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
FUNCTION(GetKeyPath, Swift, swift_getKeyPath, C_CC, AlwaysAvailable,
RETURNS(RefCountedPtrTy),
ARGS(Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(CopyKeyPathTrivialIndices, Swift, swift_copyKeyPathTrivialIndices,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, Int8PtrTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
FUNCTION(GetInitializedObjCClass, Swift, swift_getInitializedObjCClass,
C_CC, AlwaysAvailable,
RETURNS(ObjCClassPtrTy),
ARGS(ObjCClassPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_objc_swift3ImplicitObjCEntrypoint(id self, SEL selector)
FUNCTION(Swift3ImplicitObjCEntrypoint, Swift, swift_objc_swift3ImplicitObjCEntrypoint,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(ObjCPtrTy, ObjCSELTy, Int8PtrTy, SizeTy, SizeTy, SizeTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::ObjectiveC, RuntimeEffect::Allocating),
UNKNOWN_MEMEFFECTS)
FUNCTION(VerifyTypeLayoutAttribute, Swift, _swift_debug_verifyTypeLayoutAttribute,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, Int8PtrTy, Int8PtrTy, SizeTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// float swift_intToFloat32(const size_t *data, IntegerLiteralFlags flags);
FUNCTION(IntToFloat32, Swift, swift_intToFloat32, SwiftCC, AlwaysAvailable,
RETURNS(FloatTy),
ARGS(PtrTy, SizeTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
MEMEFFECTS(ReadOnly))
FUNCTION(IntToFloat64, Swift, swift_intToFloat64, SwiftCC, AlwaysAvailable,
RETURNS(DoubleTy),
ARGS(PtrTy, SizeTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
MEMEFFECTS(ReadOnly))
// const Metadata *swift_getTypeByMangledNameInContext(
// const char *typeNameStart,
// size_t typeNameLength,
// const void *context,
// const void * const *genericArgs)
FUNCTION(GetTypeByMangledNameInContext, Swift, swift_getTypeByMangledNameInContext,
SwiftCC, AlwaysAvailable,
RETURNS(TypeMetadataPtrTy),
ARGS(Int8PtrTy, SizeTy, TypeContextDescriptorPtrTy, Int8PtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ArgMemOnly))
// const Metadata *swift_getTypeByMangledNameInContext2(
// const char *typeNameStart,
// size_t typeNameLength,
// const TargetContextDescriptor<InProcess> *context,
// const void * const *genericArgs)
FUNCTION(GetTypeByMangledNameInContext2, Swift, swift_getTypeByMangledNameInContext2,
SwiftCC, SignedDescriptorAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(Int8PtrTy, SizeTy, TypeContextDescriptorPtrTy, Int8PtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ArgMemOnly))
// const Metadata *swift_getTypeByMangledNameInContextInMetadataState(
// size_t metadataState,
// const char *typeNameStart,
// size_t typeNameLength,
// const void *context,
// const void * const *genericArgs)
FUNCTION(GetTypeByMangledNameInContextInMetadataState,
Swift, swift_getTypeByMangledNameInContextInMetadataState, SwiftCC,
GetTypesInAbstractMetadataStateAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy, Int8PtrTy, SizeTy, TypeContextDescriptorPtrTy,
Int8PtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ArgMemOnly))
// const Metadata *swift_getTypeByMangledNameInContextInMetadataState2(
// size_t metadataState,
// const char *typeNameStart,
// size_t typeNameLength,
// const TargetContextDescriptor<InProcess> *context,
// const void * const *genericArgs)
FUNCTION(GetTypeByMangledNameInContextInMetadataState2,
Swift, swift_getTypeByMangledNameInContextInMetadataState2, SwiftCC,
SignedDescriptorAvailability,
RETURNS(TypeMetadataPtrTy),
ARGS(SizeTy, Int8PtrTy, SizeTy, TypeContextDescriptorPtrTy,
Int8PtrPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
MEMEFFECTS(ArgMemOnly))
// AsyncTask *swift_task_getCurrent();
FUNCTION(GetCurrentTask,
_Concurrency, swift_task_getCurrent, SwiftCC,
ConcurrencyAvailability,
RETURNS(SwiftTaskPtrTy),
ARGS(),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ReadNone))
// void *swift_task_alloc(size_t size);
FUNCTION(TaskAlloc,
_Concurrency, swift_task_alloc, SwiftCC,
ConcurrencyAvailability,
RETURNS(Int8PtrTy),
ARGS(SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ArgMemOnly))
// void swift_task_dealloc(void *ptr);
FUNCTION(TaskDealloc,
_Concurrency, swift_task_dealloc, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ArgMemOnly))
// void swift_task_dealloc_through(void *ptr);
FUNCTION(TaskDeallocThrough,
_Concurrency, swift_task_dealloc_through, SwiftCC,
CoroutineAccessorsAvailability,
RETURNS(VoidTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ArgMemOnly))
// void swift_task_cancel(AsyncTask *task);
FUNCTION(TaskCancel,
_Concurrency, swift_task_cancel, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(SwiftTaskPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ArgMemOnly))
// AsyncTaskAndContext swift_task_create(
// size_t taskCreateFlags,
// TaskOptionRecord *options,
// const Metadata *futureResultType,
// void *closureEntry, HeapObject *closureContext);
FUNCTION(TaskCreate,
_Concurrency, swift_task_create, SwiftCC,
ConcurrencyAvailability,
RETURNS(AsyncTaskAndContextTy),
ARGS(SizeTy,
SwiftTaskOptionRecordPtrTy,
TypeMetadataPtrTy,
Int8PtrTy,
RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ReadOnly))
// void swift_task_switch(AsyncContext *resumeContext,
// TaskContinuationFunction *resumeFunction,
// SerialExecutorRef newExecutor);
FUNCTION(TaskSwitchFunc,
_Concurrency, swift_task_switch, SwiftAsyncCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(SwiftContextPtrTy, Int8PtrTy, ExecutorFirstTy, ExecutorSecondTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_task_deinitOnExecutor(void *object,
// DeinitWorkFunction *work,
// SerialExecutorRef newExecutor,
// size_t flags);
FUNCTION(DeinitOnExecutorFunc,
_Concurrency, swift_task_deinitOnExecutor, SwiftCC,
IsolatedDeinitAvailability,
RETURNS(VoidTy),
ARGS(Int8PtrTy, Int8PtrTy, ExecutorFirstTy, ExecutorSecondTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_task_deinitOnExecutorMainActorBackDeploy(void *object,
// DeinitWorkFunction *work,
// SerialExecutorRef newExecutor,
// size_t flags);
FUNCTION(DeinitOnExecutorMainActorBackDeployFunc,
_Concurrency, deinitOnExecutorMainActorBackDeploy, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(Int8PtrTy, Int8PtrTy, ExecutorFirstTy, ExecutorSecondTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// AsyncTask *swift_continuation_init(AsyncContext *continuationContext,
// AsyncContinuationFlags);
FUNCTION(ContinuationInit,
_Concurrency, swift_continuation_init, SwiftCC,
ConcurrencyAvailability,
RETURNS(SwiftTaskPtrTy),
ARGS(ContinuationAsyncContextPtrTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_continuation_await(AsyncContext *continuationContext);
FUNCTION(ContinuationAwait,
_Concurrency, swift_continuation_await, SwiftAsyncCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(ContinuationAsyncContextPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_continuation_resume(AsyncTask *continuation);
FUNCTION(ContinuationResume,
_Concurrency, swift_continuation_resume, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(SwiftTaskPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_continuation_throwingResume(AsyncTask *continuation);
FUNCTION(ContinuationThrowingResume,
_Concurrency, swift_continuation_throwingResume, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(SwiftTaskPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_continuation_throwingResumeWithError(AsyncTask *continuation,
// SwiftError *error);
FUNCTION(ContinuationThrowingResumeWithError,
_Concurrency, swift_continuation_throwingResumeWithError, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(SwiftTaskPtrTy, ErrorPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// SerialExecutorRef swift_task_getCurrentExecutor();
FUNCTION(TaskGetCurrentExecutor,
_Concurrency, swift_task_getCurrentExecutor, SwiftCC,
ConcurrencyAvailability,
RETURNS(SwiftExecutorTy),
ARGS(),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ArgMemOnly))
// SerialExecutorRef swift_task_getMainExecutor();
FUNCTION(TaskGetMainExecutor,
_Concurrency, swift_task_getMainExecutor, SwiftCC,
ConcurrencyAvailability,
RETURNS(SwiftExecutorTy),
ARGS(),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ArgMemOnly))
// void swift_defaultActor_initialize(DefaultActor *actor);
FUNCTION(DefaultActorInitialize,
_Concurrency, swift_defaultActor_initialize, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_defaultActor_destroy(DefaultActor *actor);
FUNCTION(DefaultActorDestroy,
_Concurrency, swift_defaultActor_destroy, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_defaultActor_deallocate(DefaultActor *actor);
FUNCTION(DefaultActorDeallocate,
_Concurrency, swift_defaultActor_deallocate, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_defaultActor_deallocateResilient(HeapObject *actor);
FUNCTION(DefaultActorDeallocateResilient,
_Concurrency, swift_defaultActor_deallocateResilient, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_nonDefaultDistributedActor_initialize(NonDefaultDistributedActor *actor);
FUNCTION(NonDefaultDistributedActorInitialize,
_Concurrency, swift_nonDefaultDistributedActor_initialize, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// OpaqueValue* swift_distributedActor_remote_initialize(
// const Metadata *actorType
// );
FUNCTION(DistributedActorInitializeRemote,
_Concurrency, swift_distributedActor_remote_initialize, SwiftCC,
ConcurrencyAvailability, // TODO(distributed): Introduce DistributedAvailability once shipping somewhere
RETURNS(OpaquePtrTy),
ARGS(TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
/// void swift_asyncLet_begin(
/// AsyncLet *alet,
/// TaskOptionRecord *options,
/// const Metadata *futureResultType,
/// void *closureEntryPoint,
/// HeapObject *closureContext,
/// void *resultBuffer
/// );
FUNCTION(AsyncLetBegin,
_Concurrency, swift_asyncLet_begin, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(SwiftAsyncLetPtrTy, // AsyncLet*
SwiftTaskOptionRecordPtrTy, // options
TypeMetadataPtrTy, // futureResultType
Int8PtrTy, // closureEntry
OpaquePtrTy, // closureContext
Int8PtrTy
),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
/// void swift_asyncLet_finish(
/// AsyncLet *alet,
/// TaskOptionRecord *options,
/// const Metadata *futureResultType,
/// void *closureEntryPoint,
/// HeapObject *closureContext,
/// void *resultBuffer
/// );
FUNCTION(AsyncLetFinish,
_Concurrency, swift_asyncLet_finish, SwiftAsyncCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(SwiftContextPtrTy, // current context
SwiftAsyncLetPtrTy, // AsyncLet*
Int8PtrTy, // resultBuffer
TaskContinuationFunctionPtrTy, // continuation
SwiftContextPtrTy // temp context
),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
/// void swift_task_run_inline(
/// OpaqueValue *result,
/// void *closureAFP,
/// OpaqueValue *closureContext,
/// const Metadata *futureResultType
/// )
FUNCTION(TaskRunInline,
_Concurrency, swift_task_run_inline, SwiftCC,
TaskRunInlineAvailability,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, // OpaqueValue *result
Int8PtrTy, // void *closure
OpaquePtrTy, // OpaqueValue *closureContext
TypeMetadataPtrTy, // const Metadata *futureResultType
),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_taskGroup_initialize(TaskGroup *group, const Metadata *T);
FUNCTION(TaskGroupInitialize,
_Concurrency, swift_taskGroup_initialize, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_taskGroup_initializeWithFlags(size_t flags, TaskGroup *group, const Metadata *T);
FUNCTION(TaskGroupInitializeWithFlags,
_Concurrency, swift_taskGroup_initializeWithFlags, SwiftCC,
ConcurrencyDiscardingTaskGroupAvailability,
RETURNS(VoidTy),
ARGS(SizeTy, // flags
Int8PtrTy, // group
TypeMetadataPtrTy // T.Type
),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_taskGroup_initializeWithTaskOptions(size_t flags, TaskGroup *group, const Metadata *T, TaskOptionRecord *options);
FUNCTION(TaskGroupInitializeWithOptions,
_Concurrency, swift_taskGroup_initializeWithOptions, SwiftCC,
ConcurrencyDiscardingTaskGroupAvailability,
RETURNS(VoidTy),
ARGS(SizeTy, // flags
Int8PtrTy, // group
TypeMetadataPtrTy, // T.Type
SwiftTaskOptionRecordPtrTy // options
),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_taskGroup_destroy(TaskGroup *group);
FUNCTION(TaskGroupDestroy,
_Concurrency, swift_taskGroup_destroy, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// CancellationNotificationStatusRecord*
// swift_task_addCancellationHandler(
// CancellationNotificationStatusRecord::FunctionType handler,
// void *context);
FUNCTION(TaskAddCancellationHandler,
_Concurrency, swift_task_addCancellationHandler, SwiftCC,
ConcurrencyAvailability,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_task_removeCancellationHandler(
// CancellationNotificationStatusRecord *record);
FUNCTION(TaskRemoveCancellationHandler,
_Concurrency, swift_task_removeCancellationHandler, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// EscalationNotificationStatusRecord*
// swift_task_addPriorityEscalationHandler(
// EscalationNotificationStatusRecord::FunctionType handler,
// void *context);
FUNCTION(TaskAddPriorityEscalationHandler,
_Concurrency, swift_task_addPriorityEscalationHandler, SwiftCC,
ConcurrencyAvailability,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_task_removePriorityEscalationHandler(
// EscalationNotificationStatusRecord *record);
FUNCTION(TaskRemovePriorityEscalationHandler,
_Concurrency, swift_task_removePriorityEscalationHandler, SwiftCC,
ConcurrencyAvailability,
RETURNS(VoidTy),
ARGS(Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// void swift_task_localValuePush(const HeapObject *key,
// /* +1 */ OpaqueValue *value,
// const Metadata *valueType);
FUNCTION(TaskLocalValuePush, _Concurrency, swift_task_localValuePush, SwiftCC,
ConcurrencyAvailability, RETURNS(),
ARGS(RefCountedPtrTy, OpaquePtrTy, TypeMetadataPtrTy), ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency), UNKNOWN_MEMEFFECTS)
// void swift_task_localValuePop();
FUNCTION(TaskLocalValuePop,
_Concurrency, swift_task_localValuePop, SwiftCC,
ConcurrencyAvailability,
RETURNS(),
ARGS(),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
UNKNOWN_MEMEFFECTS)
// AutoDiffLinearMapContext *swift_autoDiffCreateLinearMapContextWithType(const Metadata *);
FUNCTION(AutoDiffCreateLinearMapContextWithType,
Swift, swift_autoDiffCreateLinearMapContextWithType, SwiftCC,
DifferentiationAvailability,
RETURNS(RefCountedPtrTy),
ARGS(TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::AutoDiff),
MEMEFFECTS(ArgMemOnly))
// void *swift_autoDiffProjectTopLevelSubcontext(AutoDiffLinearMapContext *);
FUNCTION(AutoDiffProjectTopLevelSubcontext,
Swift, swift_autoDiffProjectTopLevelSubcontext, SwiftCC,
DifferentiationAvailability,
RETURNS(Int8PtrTy),
ARGS(RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::AutoDiff),
MEMEFFECTS(ArgMemOnly))
// void *swift_autoDiffAllocateSubcontextWithType(AutoDiffLinearMapContext *, const Metadata *);
FUNCTION(AutoDiffAllocateSubcontextWithType,
Swift, swift_autoDiffAllocateSubcontextWithType, SwiftCC,
DifferentiationAvailability,
RETURNS(Int8PtrTy),
ARGS(RefCountedPtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::AutoDiff),
MEMEFFECTS(ArgMemOnly))
// SWIFT_RUNTIME_EXPORT
// unsigned swift_getMultiPayloadEnumTagSinglePayload(const OpaqueValue *value,
// uint32_t numExtraCases,
// const Metadata *enumType)
FUNCTION(GetMultiPayloadEnumTagSinglePayload,
Swift, swift_getMultiPayloadEnumTagSinglePayload, C_CC,
MultiPayloadEnumTagSinglePayloadAvailability,
RETURNS(Int32Ty),
ARGS(OpaquePtrTy, Int32Ty, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// SWIFT_RUNTIME_EXPORT
// void swift_storeMultiPayloadEnumTagSinglePayload(OpaqueValue *value,
// uint32_t index,
// uint32_t numExtraCases,
// const Metadata *enumType);
FUNCTION(StoreMultiPayloadEnumTagSinglePayload,
Swift, swift_storeMultiPayloadEnumTagSinglePayload, C_CC,
MultiPayloadEnumTagSinglePayloadAvailability,
RETURNS(VoidTy),
ARGS(OpaquePtrTy, Int32Ty, Int32Ty, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_destroy(opaque*, const Metadata* type);
FUNCTION(GenericDestroy,
Swift, swift_cvw_destroy,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_assignWithCopy(opaque* dest, opaque* src, const Metadata* type);
FUNCTION(GenericAssignWithCopy,
Swift, swift_cvw_assignWithCopy,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_assignWithTake(opaque* dest, opaque* src, const Metadata* type);
FUNCTION(GenericAssignWithTake,
Swift, swift_cvw_assignWithTake,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_initWithCopy(opaque* dest, opaque* src, const Metadata* type);
FUNCTION(GenericInitWithCopy,
Swift, swift_cvw_initWithCopy,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_initWithTake(opaque* dest, opaque* src, const Metadata* type);
FUNCTION(GenericInitWithTake,
Swift, swift_cvw_initWithTake,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_initializeBufferWithCopyOfBuffer(ValueBuffer* dest, ValueBuffer* src, const Metadata* type);
FUNCTION(GenericInitializeBufferWithCopyOfBuffer,
Swift, swift_cvw_initializeBufferWithCopyOfBuffer,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(PtrTy, PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_destroyMultiPayloadEnumFN(opaque*, const Metadata* type);
FUNCTION(GenericDestroyMultiPayloadEnumFN,
Swift, swift_cvw_destroyMultiPayloadEnumFN,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_assignWithCopyMultiPayloadEnumFN(opaque* dest, opaque* src, const Metadata* type);
FUNCTION(GenericAssignWithCopyMultiPayloadEnumFN,
Swift, swift_cvw_assignWithCopyMultiPayloadEnumFN,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_assignWithTakeMultiPayloadEnumFN(opaque* dest, opaque* src, const Metadata* type);
FUNCTION(GenericAssignWithTakeMultiPayloadEnumFN,
Swift, swift_cvw_assignWithTakeMultiPayloadEnumFN,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting, RuntimeEffect::Deallocating),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_initWithCopyMultiPayloadEnumFN(opaque* dest, opaque* src, const Metadata* type);
FUNCTION(GenericInitWithCopyMultiPayloadEnumFN,
Swift, swift_cvw_initWithCopyMultiPayloadEnumFN,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_initWithTakeMultiPayloadEnumFN(opaque* dest, opaque* src, const Metadata* type);
FUNCTION(GenericInitWithTakeMultiPayloadEnumFN,
Swift, swift_cvw_initWithTakeMultiPayloadEnumFN,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(Int8PtrTy, Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// void *swift_cvw_initializeBufferWithCopyOfBufferMultiPayloadEnumFN(ValueBuffer* dest, ValueBuffer* src, const Metadata* type);
FUNCTION(GenericInitializeBufferWithCopyOfBufferMultiPayloadEnumFN,
Swift, swift_cvw_initializeBufferWithCopyOfBufferMultiPayloadEnumFN,
C_CC, AlwaysAvailable,
RETURNS(Int8PtrTy),
ARGS(PtrTy, PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::RefCounting),
UNKNOWN_MEMEFFECTS)
// unsigned swift_cvw_singletonEnum_getEnumTag(swift::OpaqueValue *address,
// const Metadata *metadata);
FUNCTION(SingletonEnumGetEnumTag,
Swift, swift_cvw_singletonEnum_getEnumTag,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_singletonEnum_destructiveInjectEnumTag(swift::OpaqueValue *address,
// unsigned tag,
// const Metadata *metadata)
FUNCTION(SingletonEnumDestructiveInjectEnumTag,
Swift, swift_cvw_singletonEnum_destructiveInjectEnumTag,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, Int32Ty, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// unsigned swift_cvw_enumSimple_getEnumTag(swift::OpaqueValue *address,
// const Metadata *metadata);
FUNCTION(EnumSimpleGetEnumTag,
Swift, swift_cvw_enumSimple_getEnumTag,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// unsigned swift_cvw_enumSimple_destructiveInjectEnumTag(swift::OpaqueValue *address,
// unsigned tag,
// const Metadata *metadata)
FUNCTION(EnumSimpleDestructiveInjectEnumTag,
Swift, swift_cvw_enumSimple_destructiveInjectEnumTag,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, Int32Ty, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// unsigned swift_cvw_enumFn_getEnumTag(swift::OpaqueValue *address,
// const Metadata *metadata);
FUNCTION(EnumFnGetEnumTag,
Swift, swift_cvw_enumFn_getEnumTag,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// unsigned swift_cvw_multiPayloadEnumGeneric_getEnumTag(opaque* address,
// const Metadata *type);
FUNCTION(MultiPayloadEnumGenericGetEnumTag,
Swift, swift_cvw_multiPayloadEnumGeneric_getEnumTag,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_multiPayloadEnumGeneric_destructiveInjectEnumTag(swift::OpaqueValue *address,
// unsigned tag,
// const Metadata *metadata)
FUNCTION(MultiPayloadEnumGenericDestructiveInjectEnumTag,
Swift, swift_cvw_multiPayloadEnumGeneric_destructiveInjectEnumTag,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, Int32Ty, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// unsigned swift_cvw_singlePayloadEnumGeneric_getEnumTag(swift::OpaqueValue *address,
// const Metadata *metadata);
FUNCTION(SinglePayloadEnumGenericGetEnumTag,
Swift, swift_cvw_singlePayloadEnumGeneric_getEnumTag,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_singlePayloadEnumGeneric_destructiveInjectEnumTag(swift::OpaqueValue *address,
// unsigned tag,
// const Metadata *metadata)
FUNCTION(SinglePayloadEnumGenericDestructiveInjectEnumTag,
Swift, swift_cvw_singlePayloadEnumGeneric_destructiveInjectEnumTag,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, Int32Ty, TypeMetadataPtrTy),
ATTRS(NoUnwind, WillReturn),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
// void swift_cvw_instantiateLayoutString(const uint8_t* layoutStr,
// Metadata* type);
FUNCTION(GenericInstantiateLayoutString,
Swift, swift_cvw_instantiateLayoutString,
C_CC, AlwaysAvailable,
RETURNS(VoidTy),
ARGS(Int8PtrTy, TypeMetadataPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_initRawStructMetadata(Metadata *structType,
// StructLayoutFlags flags,
// const TypeLayout *likeType,
// int32_t count);
FUNCTION(InitRawStructMetadata,
Swift, swift_initRawStructMetadata,
C_CC, InitRawStructMetadataAvailability,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, PtrTy, Int32Ty),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// void swift_initRawStructMetadata2(Metadata *structType,
// StructLayoutFlags structLayoutFlags,
// const TypeLayout *likeType,
// intptr_t count,
// RawLayoutFlags rawLayoutFlags);
FUNCTION(InitRawStructMetadata2,
Swift, swift_initRawStructMetadata2,
C_CC, InitRawStructMetadata2Availability,
RETURNS(VoidTy),
ARGS(TypeMetadataPtrTy, SizeTy, PtrTy, SizeTy,
SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::MetaData),
UNKNOWN_MEMEFFECTS)
// _Unwind_Reason_Code _swift_exceptionPersonality(int version,
// _Unwind_Action actions,
// uint64 exceptionClass,
// struct _Unwind_Exception *exceptionObject,
// struct _Unwind_Context *context);
FUNCTION(ExceptionPersonality,
Swift, _swift_exceptionPersonality,
C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(Int32Ty,
Int32Ty,
Int64Ty,
Int8PtrTy,
Int8PtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
FUNCTION(ClearSensitive, Swift, swift_clearSensitive, C_CC, ClearSensitiveAvailability,
RETURNS(VoidTy),
ARGS(PtrTy, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
FUNCTION(MemsetS, c, memset_s, C_CC, AlwaysAvailable,
RETURNS(Int32Ty),
ARGS(PtrTy, SizeTy, Int32Ty, SizeTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::NoEffect),
UNKNOWN_MEMEFFECTS)
#undef RETURNS
#undef ARGS
#undef ATTRS
#undef NO_ARGS
#undef NO_ATTRS
#undef FUNCTION
#undef FUNCTION_NAME