Fix -DLLVM_ENABLE_THREADS=OFF build of lld after r302613

llvm-svn: 302690
This commit is contained in:
Hans Wennborg 2017-05-10 16:25:54 +00:00
parent 3b21d372c2
commit f81b4d4d21
1 changed files with 5 additions and 4 deletions

View File

@ -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, IndexTy End, FuncTy Fn) {
#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 Begin, IndexTy End, FuncTy Fn) {
// 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,