OSDN Git Service
(root)
/
android-x86
/
external-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
d5fef48
..
bf4960a
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;