aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-07-06 22:36:59 +0000
committerOwen Anderson <resistor@mac.com>2011-07-06 22:36:59 +0000
commit145a260f755789b7755b2a80b1791e19958a7513 (patch)
treebba39709a1e7300d010305991240219ef3a8d0c6 /llvm/lib/CodeGen/LiveDebugVariables.cpp
parent194cd7eb2411fa7ab7af2913cf08bfcb23153c22 (diff)
downloadllvm-145a260f755789b7755b2a80b1791e19958a7513.zip
llvm-145a260f755789b7755b2a80b1791e19958a7513.tar.gz
llvm-145a260f755789b7755b2a80b1791e19958a7513.tar.bz2
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. llvm-svn: 134554
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions