[llvm-commits] [llvm] r60354 - /llvm/trunk/include/llvm/ADT/STLExtras.h

Chris Lattner sabre at nondot.org
Mon Dec 1 09:00:22 PST 2008


Author: lattner
Date: Mon Dec  1 11:00:08 2008
New Revision: 60354

URL: http://llvm.org/viewvc/llvm-project?rev=60354&view=rev
Log:
switch to std::sort until I have time to sort this out.

Modified:
    llvm/trunk/include/llvm/ADT/STLExtras.h

Modified: llvm/trunk/include/llvm/ADT/STLExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/STLExtras.h?rev=60354&r1=60353&r2=60354&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/STLExtras.h (original)
+++ llvm/trunk/include/llvm/ADT/STLExtras.h Mon Dec  1 11:00:08 2008
@@ -246,12 +246,16 @@
 ///
 /// 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





More information about the llvm-commits mailing list