mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Don't add swift_retainCount() to RuntimeFunctions.def, but explicitly link it in linkEmbeddedRuntimeFromStdlib()
This commit is contained in:
@@ -204,14 +204,6 @@ FUNCTION(CopyPOD, swift_copyPOD, C_CC, AlwaysAvailable,
|
||||
EFFECT(NoEffect),
|
||||
UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// size_t swift_retainCount(void *ptr);
|
||||
FUNCTION(NativeRetainCount, swift_retainCount, C_CC, AlwaysAvailable,
|
||||
RETURNS(SizeTy),
|
||||
ARGS(RefCountedPtrTy),
|
||||
ATTRS(NoUnwind, WillReturn),
|
||||
EFFECT(RefCounting),
|
||||
UNKNOWN_MEMEFFECTS)
|
||||
|
||||
// void *swift_retain(void *ptr);
|
||||
FUNCTION(NativeStrongRetain, swift_retain, C_CC, AlwaysAvailable,
|
||||
RETURNS(RefCountedPtrTy),
|
||||
|
||||
@@ -63,6 +63,9 @@ public:
|
||||
#define UNKNOWN_MEMEFFECTS
|
||||
|
||||
#include "swift/Runtime/RuntimeFunctions.def"
|
||||
|
||||
// swift_retainCount is not part of private contract between the compiler and runtime, but we still need to link it
|
||||
linkEmbeddedRuntimeFunctionByName("swift_retainCount", { RefCounting });
|
||||
}
|
||||
|
||||
void linkEmbeddedRuntimeFunctionByName(StringRef name,
|
||||
|
||||
Reference in New Issue
Block a user