Be more explicit about which overloaded variant to use. Caught by ASan!
authorNick Kledzik <kledzik@apple.com>
Tue, 28 Jan 2014 23:25:13 +0000 (23:25 +0000)
committerNick Kledzik <kledzik@apple.com>
Tue, 28 Jan 2014 23:25:13 +0000 (23:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200353 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Allocator.h

index d259415bc3996ae9abe2beada915fa927a478c88..275086bffdfd6e5f43727a73b5192faac2eec6f3 100644 (file)
@@ -211,7 +211,7 @@ public:
   typename enable_if<isPodLike<T>, ArrayRef<T> >::type
   allocateCopy(ArrayRef<T> Src) {
     size_t Length = Src.size();
-    T *P = allocateCopy(Src.data(), Length*sizeof(T));
+    T *P = allocateCopy<T>(Src.data(), Length);
     return makeArrayRef(P, Length);
   }