[llvm] d9547f4 - [MLIR] Fix compilation with LLVM_ENABLE_THREADS=OFF
John Demme via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 18:21:22 PST 2022
Author: John Demme
Date: 2022-01-08T02:21:03Z
New Revision: d9547f410fce655b411d3ed75295ccac5919dd42
URL: https://github.com/llvm/llvm-project/commit/d9547f410fce655b411d3ed75295ccac5919dd42
DIFF: https://github.com/llvm/llvm-project/commit/d9547f410fce655b411d3ed75295ccac5919dd42.diff
LOG: [MLIR] Fix compilation with LLVM_ENABLE_THREADS=OFF
Currently, compiles with LLVM_ENABLE_THREADS=OFF fail due to this symbol missing. Add it but assert as calling code is (and should be) checking that threading is enabled.
Differential Revision: https://reviews.llvm.org/D116846
Added:
Modified:
llvm/lib/Support/ThreadPool.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/ThreadPool.cpp b/llvm/lib/Support/ThreadPool.cpp
index 54ea84d4bd6d2..e2bf9d7331e2a 100644
--- a/llvm/lib/Support/ThreadPool.cpp
+++ b/llvm/lib/Support/ThreadPool.cpp
@@ -117,6 +117,10 @@ void ThreadPool::wait() {
}
}
+bool ThreadPool::isWorkerThread() const {
+ assert(false && "LLVM compiled with threading disabled");
+}
+
ThreadPool::~ThreadPool() { wait(); }
#endif
More information about the llvm-commits
mailing list