File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,13 @@ internal func __CFInitializeSwift() {
154
154
__CFSocketInitializeWinSock ( )
155
155
#endif
156
156
157
+ // Ensure that the foreign type value witness for `_NSCFConstantString` is
158
+ // initialized prior to access. This may be lazily initialized on some
159
+ // targets when the type cache is updated due to a type-cast.
160
+ //
161
+ // TODO: invoke `swift_getForeignTypeMetadata` to do this directly
162
+ if let _ = " " as? _NSCFConstantString { }
163
+
157
164
_CFRuntimeBridgeTypeToClass ( CFStringGetTypeID ( ) , unsafeBitCast ( _NSCFString. self, to: UnsafeRawPointer . self) )
158
165
_CFRuntimeBridgeTypeToClass ( CFArrayGetTypeID ( ) , unsafeBitCast ( _NSCFArray. self, to: UnsafeRawPointer . self) )
159
166
_CFRuntimeBridgeTypeToClass ( CFDictionaryGetTypeID ( ) , unsafeBitCast ( _NSCFDictionary. self, to: UnsafeRawPointer . self) )
You can’t perform that action at this time.
0 commit comments