summaryrefslogtreecommitdiffstats
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
commit001181731bdf1ec43218c96294aae3541adadd89 (patch)
treebe4e1abf75b1e1e8cc1a8b49d0942b0723226db3
parent5fb10b961b5536002ce856cbb0f611bc9d55cabe (diff)
downloadbcm5719-llvm-001181731bdf1ec43218c96294aae3541adadd89.tar.gz
bcm5719-llvm-001181731bdf1ec43218c96294aae3541adadd89.zip
switch to std::sort until I have time to sort this out.
llvm-svn: 60354
-rw-r--r--llvm/include/llvm/ADT/STLExtras.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 5685729eb51..7be7699bcc2 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/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
OpenPOWER on IntegriCloud