[llvm] r310934 - Fix -Wunused-lambda-capture for Release build.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 10:39:35 PDT 2017


Author: ruiu
Date: Tue Aug 15 10:39:35 2017
New Revision: 310934

URL: http://llvm.org/viewvc/llvm-project?rev=310934&view=rev
Log:
Fix -Wunused-lambda-capture for Release build.

`I` and `this` are used only in assert or DEBUG, so they are unused
in Release build.

Modified:
    llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp

Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=310934&r1=310933&r2=310934&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Tue Aug 15 10:39:35 2017
@@ -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::resetSche
   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;




More information about the llvm-commits mailing list