mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
stubs: fix Windows x86 TLS callback CC violation
Windows x86 requires that the TLS destructor callback uses the "stdcall" calling convention. Provide a shim which will adjust the calling convention and call back into the swift portion of the code code with the expected calling convention.
This commit is contained in:
@@ -101,6 +101,7 @@ internal struct _ThreadLocalStorage {
|
||||
|
||||
// Destructor to register with pthreads. Responsible for deallocating any memory
|
||||
// owned.
|
||||
@_silgen_name("_swift_stdlib_destroyTLS")
|
||||
internal func _destroyTLS(_ ptr: UnsafeMutableRawPointer?) {
|
||||
_sanityCheck(ptr != nil,
|
||||
"_destroyTLS was called, but with nil...")
|
||||
|
||||
Reference in New Issue
Block a user