From: Rui Ueyama Date: Tue, 15 Aug 2017 17:39:35 +0000 (+0000) Subject: Fix -Wunused-lambda-capture for Release build. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=979a8cab62bc4558b3badcb829da9d8f79378eeb;p=llvm Fix -Wunused-lambda-capture for Release build. `I` and `this` are used only in assert or DEBUG, so they are unused in Release build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310934 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp index 27c8af9de2e..90287e6ba0f 100644 --- a/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -1023,7 +1023,7 @@ private: template void initialFillReadyList(ReadyListType &ReadyList) { for (auto *I = ScheduleStart; I != ScheduleEnd; I = I->getNextNode()) { - doForAllOpcodes(I, [&ReadyList, I](ScheduleData *SD) { + doForAllOpcodes(I, [&](ScheduleData *SD) { if (SD->isSchedulingEntity() && SD->isReady()) { ReadyList.insert(SD); DEBUG(dbgs() << "SLP: initially in ready list: " << *I << "\n"); @@ -3672,7 +3672,7 @@ void BoUpSLP::BlockScheduling::resetSchedule() { assert(ScheduleStart && "tried to reset schedule on block which has not been scheduled"); for (Instruction *I = ScheduleStart; I != ScheduleEnd; I = I->getNextNode()) { - doForAllOpcodes(I, [this](ScheduleData *SD) { + doForAllOpcodes(I, [&](ScheduleData *SD) { assert(isInSchedulingRegion(SD) && "ScheduleData not in scheduling region"); SD->IsScheduled = false;