diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-02-13 19:20:39 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-02-13 19:20:39 +0000 |
commit | 9d26f6462e1b1068b5ed9e4dc55e2befda0e5743 (patch) | |
tree | c033c4a502428c39b77e6802f61b2a7dfd959ac5 | |
parent | 4a8abd3f944dfa15b505e665366c9f06b10e667d (diff) | |
download | bcm5719-llvm-9d26f6462e1b1068b5ed9e4dc55e2befda0e5743.tar.gz bcm5719-llvm-9d26f6462e1b1068b5ed9e4dc55e2befda0e5743.zip |
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
-rw-r--r-- | llvm/include/llvm/ADT/SmallVector.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index af9bbb62345..c9ddf61f5e8 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); } |