[lld] r302690 - Fix -DLLVM_ENABLE_THREADS=OFF build of lld after r302613
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Wed May 10 09:25:54 PDT 2017
Author: hans
Date: Wed May 10 11:25:54 2017
New Revision: 302690
URL: http://llvm.org/viewvc/llvm-project?rev=302690&view=rev
Log:
Fix -DLLVM_ENABLE_THREADS=OFF build of lld after r302613
Modified:
lld/trunk/include/lld/Core/Parallel.h
Modified: lld/trunk/include/lld/Core/Parallel.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Parallel.h?rev=302690&r1=302689&r2=302690&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Parallel.h (original)
+++ lld/trunk/include/lld/Core/Parallel.h Wed May 10 11:25:54 2017
@@ -38,10 +38,10 @@ struct is_execution_policy
constexpr sequential_execution_policy seq{};
constexpr parallel_execution_policy par{};
-#if LLVM_ENABLE_THREADS
-
namespace detail {
+#if LLVM_ENABLE_THREADS
+
#if defined(_MSC_VER)
template <class RandomAccessIterator, class Comparator>
void parallel_sort(RandomAccessIterator Start, RandomAccessIterator End,
@@ -148,12 +148,13 @@ void parallel_for_each_n(IndexTy Begin,
#endif
+#endif
+
template <typename Iter>
using DefComparator =
std::less<typename std::iterator_traits<Iter>::value_type>;
} // namespace detail
-#endif
// sequential algorithm implementations.
template <class Policy, class RandomAccessIterator,
@@ -182,7 +183,7 @@ void for_each_n(Policy policy, IndexTy B
// Parallel algorithm implementations, only available when LLVM_ENABLE_THREADS
// is true.
-#if defined(LLVM_ENABLE_THREADS)
+#if LLVM_ENABLE_THREADS
template <class RandomAccessIterator,
class Comparator = detail::DefComparator<RandomAccessIterator>>
void sort(parallel_execution_policy policy, RandomAccessIterator Start,
More information about the llvm-commits
mailing list