aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Threading.cpp
diff options
context:
space:
mode:
authorJun Zhang <jun@junz.org>2022-08-08 08:46:20 +0800
committerJun Zhang <jun@junz.org>2022-08-08 08:49:02 +0800
commit98339ac7af30b95f42f50e27bb6f6b7e2857ddc9 (patch)
tree5824e10c23495495f9c07ca5fd83b8e4a9b0cf76 /llvm/lib/Support/Threading.cpp
parent1d1f5a5251f7570615f0669a56af0ac5b8b302bc (diff)
downloadllvm-98339ac7af30b95f42f50e27bb6f6b7e2857ddc9.zip
llvm-98339ac7af30b95f42f50e27bb6f6b7e2857ddc9.tar.gz
llvm-98339ac7af30b95f42f50e27bb6f6b7e2857ddc9.tar.bz2
[Support] move llvm::llvm_is_multithread to header, NFC
This allow optimization without LTO. Also remove some useless else-ifs. Signed-off-by: Jun Zhang <jun@junz.org> Differential Revision: https://reviews.llvm.org/D131313
Diffstat (limited to 'llvm/lib/Support/Threading.cpp')
-rw-r--r--llvm/lib/Support/Threading.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp
index 04a1a9e..1a7ecde 100644
--- a/llvm/lib/Support/Threading.cpp
+++ b/llvm/lib/Support/Threading.cpp
@@ -28,14 +28,6 @@ using namespace llvm;
//=== independent code.
//===----------------------------------------------------------------------===//
-bool llvm::llvm_is_multithreaded() {
-#if LLVM_ENABLE_THREADS != 0
- return true;
-#else
- return false;
-#endif
-}
-
#if LLVM_ENABLE_THREADS == 0 || \
(!defined(_WIN32) && !defined(HAVE_PTHREAD_H))
uint64_t llvm::get_threadid() { return 0; }