[llvm] r229142 - SmallVector: Resolve a long-standing fixme by using the existing unitialized_copy dispatch.
Benjamin Kramer
benny.kra at googlemail.com
Fri Feb 13 11:20:39 PST 2015
Author: d0k
Date: Fri Feb 13 13:20:39 2015
New Revision: 229142
URL: http://llvm.org/viewvc/llvm-project?rev=229142&view=rev
Log:
SmallVector: Resolve a long-standing fixme by using the existing unitialized_copy dispatch.
This makes append() use memcpy for trivially copyable types.
Modified:
llvm/trunk/include/llvm/ADT/SmallVector.h
Modified: llvm/trunk/include/llvm/ADT/SmallVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=229142&r1=229141&r2=229142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallVector.h Fri Feb 13 13:20:39 2015
@@ -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);
}
More information about the llvm-commits
mailing list