[LoopVer] Add missing std::move

The reason I was passing this vector by value in the constructor so that
I wouldn't have to copy when initializing the corresponding member but
then I forgot the std::move.

The use-case is LoopDistribution which filters the checks then
std::moves it to LoopVersioning's constructor.  With this interface we
can avoid any copies.

llvm-svn: 243616
This commit is contained in:
Adam Nemet 2015-07-30 04:21:13 +00:00
parent e099213481
commit 252d529b6c
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ LoopVersioning::LoopVersioning(
const LoopAccessInfo &LAI, Loop *L, LoopInfo *LI, DominatorTree *DT,
const SmallVector<int, 8> *PtrToPartition)
: VersionedLoop(L), NonVersionedLoop(nullptr),
PtrToPartition(PtrToPartition), Checks(Checks), LAI(LAI), LI(LI), DT(DT) {
PtrToPartition(PtrToPartition), Checks(std::move(Checks)), LAI(LAI),
LI(LI), DT(DT) {
assert(L->getExitBlock() && "No single exit block");
assert(L->getLoopPreheader() && "No preheader");
}