aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-23 16:45:24 +0000
committerDan Gohman <gohman@apple.com>2008-06-23 16:45:24 +0000
commit7894ea75b5e25b2ca354a79f7b552ea941d157d8 (patch)
tree8940821801b77a810b706a06aefd7ec56fc36063
parent1a203571ca94c4770a8cada8ace7fbeb0e65799a (diff)
Use std::copy instead of a loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52628 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Instructions.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 3421292930..1ce58eb6e7 100644
--- 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);
}