From c80ff7d4b0d62e4547e6d4630f028e5ccf9528e2 Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Tue, 28 Jan 2014 23:25:13 +0000 Subject: Be more explicit about which overloaded variant to use. Caught by ASan! llvm-svn: 200353 --- llvm/include/llvm/Support/Allocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm') diff --git a/llvm/include/llvm/Support/Allocator.h b/llvm/include/llvm/Support/Allocator.h index d259415bc39..275086bffdf 100644 --- a/llvm/include/llvm/Support/Allocator.h +++ b/llvm/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); } -- cgit v1.2.3