From: Chris Lattner Date: Mon, 1 Dec 2008 06:50:46 +0000 (+0000) Subject: don't assume iterators implicitly convert to pointers. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4329c428404981fb752b51eaec54b451de83a5b0;p=oota-llvm.git don't assume iterators implicitly convert to pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60336 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index ae1a1abefda..87f7a117251 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -254,7 +254,7 @@ template 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); }