From bef94bcbae5f5f4e01f0247322e3381f0cc07c5e Mon Sep 17 00:00:00 2001 From: Daniel Neilson Date: Wed, 4 Oct 2017 18:19:03 +0000 Subject: 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 --- llvm/lib/Support/Parallel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Support/Parallel.cpp') 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 #include @@ -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. -- cgit v1.2.3