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:
1a20357
)
Use std::copy instead of a loop.
author
Dan Gohman
<gohman@apple.com>
Mon, 23 Jun 2008 16:45:24 +0000
(16:45 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 23 Jun 2008 16:45:24 +0000
(16:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52628
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Instructions.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Instructions.cpp
b/lib/VMCore/Instructions.cpp
index 3421292930d490f4995e436b2357ce21a35cf386..1ce58eb6e75beef5f23416500db9d643b9c71bb3 100644
(file)
--- a/
lib/VMCore/Instructions.cpp
+++ b/
lib/VMCore/Instructions.cpp
@@
-190,9
+190,7
@@
void PHINode::resizeOperands(unsigned NumOps) {
ReservedSpace = NumOps;
Use *OldOps = OperandList;
Use *NewOps = allocHungoffUses(NumOps);
- for (unsigned i = 0; i != e; ++i) {
- NewOps[i] = OldOps[i];
- }
+ std::copy(OldOps, OldOps + e, NewOps);
OperandList = NewOps;
if (OldOps) Use::zap(OldOps, OldOps + e, true);
}