From 7894ea75b5e25b2ca354a79f7b552ea941d157d8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 23 Jun 2008 16:45:24 +0000 Subject: Use std::copy instead of a loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52628 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Instructions.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/VMCore') 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); } -- cgit v1.1