summaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/STLExtras.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-01 17:00:08 +0000
committerChris Lattner <sabre@nondot.org>2008-12-01 17:00:08 +0000
commitde5debfb580bb750af8cda1f87cdd4f70fec7a2b (patch)
tree6961543e225909644632d5b703ec93781e363a05 /include/llvm/ADT/STLExtras.h
parent0f41ad3bc9a295332a8e6d025b42cebc9b9e8125 (diff)
downloadexternal_llvm-de5debfb580bb750af8cda1f87cdd4f70fec7a2b.zip
external_llvm-de5debfb580bb750af8cda1f87cdd4f70fec7a2b.tar.gz
external_llvm-de5debfb580bb750af8cda1f87cdd4f70fec7a2b.tar.bz2
switch to std::sort until I have time to sort this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/STLExtras.h')
-rw-r--r--include/llvm/ADT/STLExtras.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index 5685729..7be7699 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -246,12 +246,16 @@ static inline int array_pod_sort_comparator(const void *P1, const void *P2) {
///
/// NOTE: If qsort_r were portable, we could allow a custom comparator and
/// default to std::less.
+#include <algorithm>
+
template<class IteratorTy>
static inline void array_pod_sort(IteratorTy Start, IteratorTy End) {
+ std::sort(Start, End);
+
// Don't dereference start iterator of empty sequence.
- if (Start == End) return;
- qsort(&*Start, End-Start, sizeof(*Start),
- array_pod_sort_comparator<sizeof(*Start)>);
+ //if (Start == End) return;
+ //qsort(&*Start, End-Start, sizeof(*Start),
+ // array_pod_sort_comparator<*Start>);
}
} // End llvm namespace