summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2019-11-06 14:25:33 +0100
committerIlya Biryukov <ibiryukov@google.com>2019-11-06 15:18:58 +0100
commit3e54404c71564d9c684742439f178f07f1e45a70 (patch)
treee327fcb64736bbae70fe84c8c0fe1e7b3c25cf96
parenteabd405e665e24e00dc71c90baa196c38cd15f12 (diff)
downloadbcm5719-llvm-3e54404c71564d9c684742439f178f07f1e45a70.tar.gz
bcm5719-llvm-3e54404c71564d9c684742439f178f07f1e45a70.zip
[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
-rw-r--r--llvm/lib/Support/Windows/Threading.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/Threading.inc b/llvm/lib/Support/Windows/Threading.inc
index 83b47ea1e3d..9456efa686f 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(
OpenPOWER on IntegriCloud