From ffcc42764e6915c99e9118285f699701126b7063 Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Tue, 28 Jan 2014 23:25:13 +0000 Subject: [PATCH] Be more explicit about which overloaded variant to use. Caught by ASan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200353 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Allocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index d259415bc39..275086bffdf 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -211,7 +211,7 @@ public: typename enable_if, ArrayRef >::type allocateCopy(ArrayRef Src) { size_t Length = Src.size(); - T *P = allocateCopy(Src.data(), Length*sizeof(T)); + T *P = allocateCopy(Src.data(), Length); return makeArrayRef(P, Length); }