File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1380,11 +1380,19 @@ id swift_dynamicCastObjCProtocolConditional(id object,
13801380 return object;
13811381}
13821382
1383+ #if OBJC_SUPPORTSLAZYREALIZATION_DEFINED
1384+ static bool checkObjCSupportsLazyRealization () {
1385+ if (!SWIFT_RUNTIME_WEAK_CHECK (_objc_supportsLazyRealization))
1386+ return false ;
1387+ return SWIFT_RUNTIME_WEAK_USE (_objc_supportsLazyRealization ());
1388+ }
1389+ #endif
1390+
13831391// Check whether the current ObjC runtime supports lazy realization. If it does,
13841392// then we can avoid forcing realization of classes before we use them.
13851393static bool objcSupportsLazyRealization () {
13861394#if OBJC_SUPPORTSLAZYREALIZATION_DEFINED
1387- return SWIFT_LAZY_CONSTANT (_objc_supportsLazyRealization ());
1395+ return SWIFT_LAZY_CONSTANT (checkObjCSupportsLazyRealization ());
13881396#else
13891397 return false ;
13901398#endif
You can’t perform that action at this time.
0 commit comments