projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41b1a48
)
Fix for PR3946, in which SmallVector could behave strangely in corner cases.
author
Owen Anderson
<resistor@mac.com>
Wed, 22 Apr 2009 07:16:54 +0000
(07:16 +0000)
committer
Owen Anderson
<resistor@mac.com>
Wed, 22 Apr 2009 07:16:54 +0000
(07:16 +0000)
Patch by Peter Johnson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69785
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/SmallVector.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SmallVector.h
b/include/llvm/ADT/SmallVector.h
index d5fef4828e612e58150d85a79c3971359da2722e..bf4960ad1445a6e6c3093bfb06824d0ff4f94442 100644
(file)
--- a/
include/llvm/ADT/SmallVector.h
+++ b/
include/llvm/ADT/SmallVector.h
@@
-302,7
+302,7
@@
public:
append(End-NumToInsert, End);
// Copy the existing elements that get replaced.
- std::copy
(I, OldEnd-NumToInsert, I+NumToInsert
);
+ std::copy
_backward(I, OldEnd-NumToInsert, OldEnd
);
std::fill_n(I, NumToInsert, Elt);
return I;
@@
-351,7
+351,7
@@
public:
append(End-NumToInsert, End);
// Copy the existing elements that get replaced.
- std::copy
(I, OldEnd-NumToInsert, I+NumToInsert
);
+ std::copy
_backward(I, OldEnd-NumToInsert, OldEnd
);
std::copy(From, To, I);
return I;