Owen Anderson 9cbd7afb76 Fix a subtle issue in SmallVector. The following code did not work as expected:
vec.insert(vec.begin(), vec[3]);
The issue was that vec[3] returns a reference into the vector, which is invalidated when insert() memmove's the elements down to make space.  The method needs to specifically detect and handle this case to correctly match std::vector's semantics.

Thanks to Howard Hinnant for clarifying the correct behavior, and explaining how std::vector solves this problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134554 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-06 22:36:59 +00:00
..
2011-03-30 15:42:27 +00:00
2011-04-28 08:17:08 +00:00
2011-03-01 22:07:32 +00:00
2011-03-07 05:35:01 +00:00
2011-02-14 06:14:20 +00:00