summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-01 06:50:46 +0000
committerChris Lattner <sabre@nondot.org>2008-12-01 06:50:46 +0000
commit4329c428404981fb752b51eaec54b451de83a5b0 (patch)
tree2c98363e6e85bc00048da676e7b44d8e8dd0f61d /include
parent99d0015735f8e2aee1a4b99e39ffdaadc8a1dba8 (diff)
downloadllvm-4329c428404981fb752b51eaec54b451de83a5b0.tar.gz
llvm-4329c428404981fb752b51eaec54b451de83a5b0.tar.bz2
llvm-4329c428404981fb752b51eaec54b451de83a5b0.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/STLExtras.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index ae1a1abefd..87f7a11725 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -254,7 +254,7 @@ template<class IteratorTy>
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)>);
}