]> granicus.if.org Git - llvm/commitdiff
Fix -Wunused-lambda-capture for Release build.
authorRui Ueyama <ruiu@google.com>
Tue, 15 Aug 2017 17:39:35 +0000 (17:39 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 15 Aug 2017 17:39:35 +0000 (17:39 +0000)
`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

lib/Transforms/Vectorize/SLPVectorizer.cpp

index 27c8af9de2e95169374593aa25bee1325e3a2c6c..90287e6ba0f7f85a759458d25afa8c72fb2fd4d1 100644 (file)
@@ -1023,7 +1023,7 @@ private:
     template <typename ReadyListType>
     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;