Update SmallVector to support move semantics if the host does.
authorJohn McCall <rjmccall@apple.com>
Wed, 2 May 2012 05:39:15 +0000 (05:39 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 2 May 2012 05:39:15 +0000 (05:39 +0000)
commit38dbb606755232e229f11994fc2bbf10e8c5788b
tree0e5d94911cda11f75288a5431d7f6fdf3c992ae0
parent9679f0f35742aa9792b01c26e08b2932cc8428ed
Update SmallVector to support move semantics if the host does.
Note that support for rvalue references does not imply support
for the full set of move-related STL operations.

I've preserved support for an odd little thing in insert() where
we're trying to support inserting a new element from an existing
one.  If we actually want to support that, there's a lot more we
need to do:  insert can call either grow or push_back, neither of
which is safe against this particular use pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155979 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/SmallVector.h
include/llvm/Support/Compiler.h