[llvm] 3e54404 - [Support] fix mingw-w64 build
Ilya Biryukov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 06:27:53 PST 2019
Author: Ilya Biryukov
Date: 2019-11-06T15:18:58+01:00
New Revision: 3e54404c71564d9c684742439f178f07f1e45a70
URL: https://github.com/llvm/llvm-project/commit/3e54404c71564d9c684742439f178f07f1e45a70
DIFF: https://github.com/llvm/llvm-project/commit/3e54404c71564d9c684742439f178f07f1e45a70.diff
LOG: [Support] fix mingw-w64 build
Older versions of Mingw-w64 do not define _beginthreadex_proc_type,
so we replace it with `unsigned (__stdcall *ThreadFunc)(void *)`.
Fixes https://github.com/clangd/clangd/issues/188
Patch by lh123!
Differential Revision: https://reviews.llvm.org/D69879
Added:
Modified:
llvm/lib/Support/Windows/Threading.inc
Removed:
################################################################################
diff --git a/llvm/lib/Support/Windows/Threading.inc b/llvm/lib/Support/Windows/Threading.inc
index 83b47ea1e3df..9456efa686ff 100644
--- a/llvm/lib/Support/Windows/Threading.inc
+++ b/llvm/lib/Support/Windows/Threading.inc
@@ -34,7 +34,7 @@ static unsigned __stdcall threadFuncAsync(void *Arg) {
}
static void
-llvm_execute_on_thread_impl(_beginthreadex_proc_type ThreadFunc, void *Arg,
+llvm_execute_on_thread_impl(unsigned (__stdcall *ThreadFunc)(void *), void *Arg,
llvm::Optional<unsigned> StackSizeInBytes,
JoiningPolicy JP) {
HANDLE hThread = (HANDLE)::_beginthreadex(
More information about the llvm-commits
mailing list