brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 272e386 Raw
50 lines · c
1struct ImmortalRefType {2    ImmortalRefType * methodReturningFrt__(void);3    ImmortalRefType * methodReturningFrt_returns_unretained(void);4    ImmortalRefType * methodReturningFrt_returns_retained(void);5};6 7ImmortalRefType * functionReturningFrt__(void);8ImmortalRefType * functionReturningFrt_returns_unretained(void);9ImmortalRefType * functionReturningFrt_returns_retained(void);10 11 12struct RefCountedType { int value; };13 14inline void RCRetain(RefCountedType *x) { x->value++; }15inline void RCRelease(RefCountedType *x) { x->value--; }16 17struct NonCopyableType { int value; };18struct CopyableType { int value; };19 20struct NonEscapableType { int value; };21struct EscapableType { int value; };22 23struct RefCountedTypeWithDefaultConvention {};24inline void retain(RefCountedType *x) {}25inline void release(RefCountedType *x) {}26 27struct OpaqueRefCountedType;28struct OpaqueRefCountedType; // redeclaration29 30inline void ORCRetain(struct OpaqueRefCountedType *x);31inline void ORCRelease(struct OpaqueRefCountedType *x);32 33typedef unsigned WrappedOptions;34 35struct NoncopyableWithDestroyType {36};37 38void NCDDestroy(NoncopyableWithDestroyType instance);39 40void ImportAsUnsafe();41struct ImportAsUnsafeStruct {42};43struct StructWithUnsafeMethod {44    void ImportAsUnsafeMethod();45    void ImportAsUnsafeMethodActuallySafe();46};47 48void ImportAsUnsafeAlreadyAnnotated() __attribute__((swift_attr("unsafe")));49void ImportAsUnsafeVersioned();50