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

Chris Lattner sabre at nondot.org
Sun Nov 30 22:50:46 PST 2008


Author: lattner
Date: Mon Dec  1 00:50:46 2008
New Revision: 60336

URL: http://llvm.org/viewvc/llvm-project?rev=60336&view=rev
Log:
don't assume iterators implicitly convert to pointers.

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=60336&r1=60335&r2=60336&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/STLExtras.h (original)
+++ llvm/trunk/include/llvm/ADT/STLExtras.h Mon Dec  1 00:50:46 2008
@@ -254,7 +254,7 @@
 static inline void array_pod_sort(IteratorTy Start, IteratorTy End) {
   // Don't dereference start iterator of empty sequence.
   if (Start == End) return;
-  qsort(Start, End-Start, sizeof(*Start),
+  qsort(&*Start, End-Start, sizeof(*Start),
         array_pod_sort_comparator<sizeof(*Start)>);
 }
   





More information about the llvm-commits mailing list