aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CrashRecoveryContext.cpp
diff options
context:
space:
mode:
authorTim Northover <t.p.northover@gmail.com>2021-07-08 14:59:47 +0100
committerTim Northover <t.p.northover@gmail.com>2021-07-08 14:59:47 +0100
commit2bf5e8d953ededbc208bd4c116c9d6331d73f0f0 (patch)
tree6f0e1d1dce203f49fd943933ea271edbb56bee75 /llvm/lib/Support/CrashRecoveryContext.cpp
parent727e1c9be3a5b20c6b502f056d74a681689049d7 (diff)
downloadllvm-2bf5e8d953ededbc208bd4c116c9d6331d73f0f0.zip
llvm-2bf5e8d953ededbc208bd4c116c9d6331d73f0f0.tar.gz
llvm-2bf5e8d953ededbc208bd4c116c9d6331d73f0f0.tar.bz2
Revert "Support: add llvm::thread class that supports specifying stack size."
It's causing build failures because DefaultStackSize isn't defined everywhere it should be and I need time to investigate.
Diffstat (limited to 'llvm/lib/Support/CrashRecoveryContext.cpp')
-rw-r--r--llvm/lib/Support/CrashRecoveryContext.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp
index 433d99d..3ee6a4f 100644
--- a/llvm/lib/Support/CrashRecoveryContext.cpp
+++ b/llvm/lib/Support/CrashRecoveryContext.cpp
@@ -13,7 +13,6 @@
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/ThreadLocal.h"
-#include "llvm/Support/thread.h"
#include <mutex>
#include <setjmp.h>
@@ -501,12 +500,10 @@ bool CrashRecoveryContext::RunSafelyOnThread(function_ref<void()> Fn,
unsigned RequestedStackSize) {
bool UseBackgroundPriority = hasThreadBackgroundPriority();
RunSafelyOnThreadInfo Info = { Fn, this, UseBackgroundPriority, false };
- llvm::thread Thread(RequestedStackSize == 0
- ? llvm::None
- : llvm::Optional<unsigned>(RequestedStackSize),
- RunSafelyOnThread_Dispatch, &Info);
- Thread.join();
-
+ llvm_execute_on_thread(RunSafelyOnThread_Dispatch, &Info,
+ RequestedStackSize == 0
+ ? llvm::None
+ : llvm::Optional<unsigned>(RequestedStackSize));
if (CrashRecoveryContextImpl *CRC = (CrashRecoveryContextImpl *)Impl)
CRC->setSwitchedThread();
return Info.Result;