swift
cc9a567e - stdlib: use the destructor CC adjustment thunk

Commit
6 years ago
stdlib: use the destructor CC adjustment thunk Use the wrapper for the CC adjustment as on Windows x86, the destructor needs to be `__stdcall`. This would fail otherwise with the following: ``` D:\a\1\s\swift\stdlib\public\stubs\ThreadLocalStorage.cpp(86,18): error: no matching function for call to '_stdlib_thread_key_create' int result = SWIFT_THREAD_KEY_CREATE(&key, [](void *pointer) { ^~~~~~~~~~~~~~~~~~~~~~~ D:\a\1\s\swift\stdlib\public\stubs/../runtime/ThreadLocalStorage.h(96,35): note: expanded from macro 'SWIFT_THREAD_KEY_CREATE' ^~~~~~~~~~~~~~~~~~~~~~~~~ D:\a\1\s\swift\include\swift/Basic/Lazy.h(42,27): note: expanded from macro 'SWIFT_ONCE_F' ::std::call_once(TOKEN, FUNC, CONTEXT) ^~~~ D:\a\1\s\swift\stdlib\public\stubs\ThreadLocalStorage.cpp(43,1): note: candidate function not viable: no known conversion from '(lambda at D:\a\1\s\swift\stdlib\public\stubs\ThreadLocalStorage.cpp:85:3)' to '__swift_thread_key_destructor _Nullable' (aka 'void (*)(void *) __attribute__((stdcall))') for 2nd argument _stdlib_thread_key_create(__swift_thread_key_t * _Nonnull key, ^ ```
Author
Committer
Parents
Loading