llvm.org GIT mirror llvm / de5debf
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 Chris Lattner 11 years ago
1 changed file(s) with 7 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
245245 ///
246246 /// NOTE: If qsort_r were portable, we could allow a custom comparator and
247247 /// default to std::less.
248 #include
249
248250 template
249251 static inline void array_pod_sort(IteratorTy Start, IteratorTy End) {
252 std::sort(Start, End);
253
250254 // Don't dereference start iterator of empty sequence.
251 if (Start == End) return;
252 qsort(&*Start, End-Start, sizeof(*Start),
253 array_pod_sort_comparator);
255 //if (Start == End) return;
256 //qsort(&*Start, End-Start, sizeof(*Start),
257 // array_pod_sort_comparator<*Start>);
254258 }
255259
256260 } // End llvm namespace