diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-23 16:45:24 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-23 16:45:24 +0000 |
commit | 7894ea75b5e25b2ca354a79f7b552ea941d157d8 (patch) | |
tree | 8940821801b77a810b706a06aefd7ec56fc36063 /lib/VMCore | |
parent | 1a203571ca94c4770a8cada8ace7fbeb0e65799a (diff) | |
download | external_llvm-7894ea75b5e25b2ca354a79f7b552ea941d157d8.zip external_llvm-7894ea75b5e25b2ca354a79f7b552ea941d157d8.tar.gz external_llvm-7894ea75b5e25b2ca354a79f7b552ea941d157d8.tar.bz2 |
Use std::copy instead of a loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 3421292..1ce58eb 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); } |