@@ -3029,13 +3029,6 @@ _swift_initClassMetadataImpl(ClassMetadata *self,
3029
3029
setUpObjCRuntimeGetImageNameFromClass ();
3030
3030
}, nullptr );
3031
3031
3032
- #ifndef OBJC_REALIZECLASSFROMSWIFT_DEFINED
3033
- // Temporary workaround until _objc_realizeClassFromSwift is in the SDK.
3034
- static auto _objc_realizeClassFromSwift =
3035
- (Class (*)(Class _Nullable, void *_Nullable))
3036
- dlsym (RTLD_NEXT, " _objc_realizeClassFromSwift" );
3037
- #endif
3038
-
3039
3032
// Temporary workaround until objc_loadClassref is in the SDK.
3040
3033
static auto objc_loadClassref =
3041
3034
(Class (*)(void *))
@@ -3078,7 +3071,7 @@ _swift_initClassMetadataImpl(ClassMetadata *self,
3078
3071
// be safe to ignore the stub in this case.
3079
3072
if (stub != nullptr &&
3080
3073
objc_loadClassref != nullptr &&
3081
- _objc_realizeClassFromSwift != nullptr ) {
3074
+ & _objc_realizeClassFromSwift != nullptr ) {
3082
3075
_objc_realizeClassFromSwift ((Class) self, const_cast <void *>(stub));
3083
3076
} else {
3084
3077
swift_instantiateObjCClass (self);
@@ -3129,14 +3122,7 @@ _swift_updateClassMetadataImpl(ClassMetadata *self,
3129
3122
const TypeLayout * const *fieldTypes,
3130
3123
size_t *fieldOffsets,
3131
3124
bool allowDependency) {
3132
- #ifndef OBJC_REALIZECLASSFROMSWIFT_DEFINED
3133
- // Temporary workaround until _objc_realizeClassFromSwift is in the SDK.
3134
- static auto _objc_realizeClassFromSwift =
3135
- (Class (*)(Class _Nullable, void *_Nullable))
3136
- dlsym (RTLD_NEXT, " _objc_realizeClassFromSwift" );
3137
- #endif
3138
-
3139
- bool requiresUpdate = (_objc_realizeClassFromSwift != nullptr );
3125
+ bool requiresUpdate = (&_objc_realizeClassFromSwift != nullptr );
3140
3126
3141
3127
// If we're on a newer runtime, we're going to be initializing the
3142
3128
// field offset vector. Realize the superclass metadata first, even
0 commit comments