@@ -20,26 +20,6 @@ using namespace swift;
20
20
21
21
namespace swift {
22
22
23
- // Entrypoint provided by the runtime in the OS that first contains support for
24
- // concurrency. Explicitly redeclared as "weak" because this code will run on
25
- // systems where it is not present.
26
- const FunctionTypeMetadata *
27
- swift_getFunctionTypeMetadataGlobalActor (
28
- FunctionTypeFlags flags, FunctionMetadataDifferentiabilityKind diffKind,
29
- const Metadata *const *parameters, const uint32_t *parameterFlags,
30
- const Metadata *result, const Metadata *globalActor
31
- ) SWIFT_RUNTIME_WEAK_IMPORT;
32
-
33
- // Entrypoint provided only in the back-deployed concurrency library, which
34
- // has a separate allocation area for global-actor-qualified function types.
35
- extern " C"
36
- const FunctionTypeMetadata *
37
- swift_getFunctionTypeMetadataGlobalActorStandalone (
38
- FunctionTypeFlags flags, FunctionMetadataDifferentiabilityKind diffKind,
39
- const Metadata *const *parameters, const uint32_t *parameterFlags,
40
- const Metadata *result, const Metadata *globalActor
41
- ) SWIFT_RUNTIME_WEAK_IMPORT;
42
-
43
23
// Entrypoint called by the compiler when back-deploying concurrency, which
44
24
// switches between the real implementation of
45
25
// swift_getFunctionTypeMetadataGlobalActor and
@@ -66,10 +46,11 @@ swift::swift_getFunctionTypeMetadataGlobalActorBackDeploy(
66
46
static BuilderFn builderFn;
67
47
static dispatch_once_t builderToken;
68
48
dispatch_once (&builderToken, ^{
69
- if (swift_getFunctionTypeMetadataGlobalActor) {
70
- builderFn = swift_getFunctionTypeMetadataGlobalActor;
49
+ // Prefer the function from the Swift runtime if it is available.
50
+ builderFn = reinterpret_cast <BuilderFn>(
51
+ dlsym (RTLD_DEFAULT, " swift_getFunctionTypeMetadataGlobalActor" ));
52
+ if (builderFn)
71
53
return ;
72
- }
73
54
74
55
builderFn = reinterpret_cast <BuilderFn>(
75
56
dlsym (RTLD_DEFAULT,
0 commit comments