Use std::copy instead of a loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52628 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-06-23 16:45:24 +00:00
parent 1a203571ca
commit 7894ea75b5

View File

@ -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);
}