aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-01-27 22:17:16 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-06-04 11:59:19 +0000
commit390adc38fc112be360bd15499e5241bf4e675b6f (patch)
tree712d68d3aa03f7aa4902ba03dcac2a56f49ae0e5 /contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp
parent8a84287b0edc66fc6dede3db770d10ff41da5464 (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp b/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp
index 54ea84d4bd6d..9f92ae1c7a7c 100644
--- a/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/ThreadPool.cpp
@@ -13,8 +13,12 @@
#include "llvm/Support/ThreadPool.h"
#include "llvm/Config/llvm-config.h"
+
+#if LLVM_ENABLE_THREADS
#include "llvm/Support/Threading.h"
+#else
#include "llvm/Support/raw_ostream.h"
+#endif
using namespace llvm;
@@ -117,6 +121,10 @@ void ThreadPool::wait() {
}
}
+bool ThreadPool::isWorkerThread() const {
+ report_fatal_error("LLVM compiled without multithreading");
+}
+
ThreadPool::~ThreadPool() { wait(); }
#endif