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); }