summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Parallel.cpp
diff options
context:
space:
mode:
authorDaniel Neilson <dneilson@azul.com>2017-10-04 18:19:03 +0000
committerDaniel Neilson <dneilson@azul.com>2017-10-04 18:19:03 +0000
commitbef94bcbae5f5f4e01f0247322e3381f0cc07c5e (patch)
tree2966d82cacfaddcd03fc96d4d9db4d08d09fb8ba /llvm/lib/Support/Parallel.cpp
parent9edbe110e88a99215836cfc4700f4fab6c8f4dbe (diff)
downloadbcm5719-llvm-bef94bcbae5f5f4e01f0247322e3381f0cc07c5e.tar.gz
bcm5719-llvm-bef94bcbae5f5f4e01f0247322e3381f0cc07c5e.zip
Revert D38481 due to missing cmake check for CPU_COUNT
Summary: This reverts D38481. The change breaks systems with older versions of glibc. It injects a use of CPU_COUNT() from sched.h without checking to ensure that the function exists first. Reviewers: Subscribers: llvm-svn: 314922
Diffstat (limited to 'llvm/lib/Support/Parallel.cpp')
-rw-r--r--llvm/lib/Support/Parallel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Parallel.cpp b/llvm/lib/Support/Parallel.cpp
index 010e42916f9..ab2cfdebf07 100644
--- a/llvm/lib/Support/Parallel.cpp
+++ b/llvm/lib/Support/Parallel.cpp
@@ -9,7 +9,6 @@
#include "llvm/Support/Parallel.h"
#include "llvm/Config/llvm-config.h"
-#include "llvm/Support/Threading.h"
#include <atomic>
#include <stack>
@@ -71,7 +70,8 @@ Executor *Executor::getDefaultExecutor() {
/// in filo order.
class ThreadPoolExecutor : public Executor {
public:
- explicit ThreadPoolExecutor(unsigned ThreadCount = hardware_concurrency())
+ explicit ThreadPoolExecutor(
+ unsigned ThreadCount = std::thread::hardware_concurrency())
: Done(ThreadCount) {
// Spawn all but one of the threads in another thread as spawning threads
// can take a while.
OpenPOWER on IntegriCloud