From 9d26f6462e1b1068b5ed9e4dc55e2befda0e5743 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 13 Feb 2015 19:20:39 +0000 Subject: [PATCH] SmallVector: Resolve a long-standing fixme by using the existing unitialized_copy dispatch. This makes append() use memcpy for trivially copyable types. llvm-svn: 229142 --- llvm/include/llvm/ADT/SmallVector.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index af9bbb6..c9ddf61 100644 --- a/llvm/include/llvm/ADT/SmallVector.h +++ b/llvm/include/llvm/ADT/SmallVector.h @@ -414,9 +414,7 @@ public: this->grow(this->size()+NumInputs); // Copy the new elements over. - // TODO: NEED To compile time dispatch on whether in_iter is a random access - // iterator to use the fast uninitialized_copy. - std::uninitialized_copy(in_start, in_end, this->end()); + this->uninitialized_copy(in_start, in_end, this->end()); this->setEnd(this->end() + NumInputs); } -- 2.7.4