[SCEV] Fix a warning on an unused lambda capture
authorKazu Hirata <kazu@google.com>
Mon, 25 Oct 2021 07:45:18 +0000 (00:45 -0700)
committerKazu Hirata <kazu@google.com>
Mon, 25 Oct 2021 07:45:18 +0000 (00:45 -0700)
This patch fixes:

  llvm/lib/Analysis/ScalarEvolution.cpp:12770:37: error: lambda
  capture 'this' is not used [-Werror,-Wunused-lambda-capture]

llvm/lib/Analysis/ScalarEvolution.cpp

index f0e3237..d3ae7da 100644 (file)
@@ -12767,7 +12767,7 @@ void ScalarEvolution::forgetMemoizedResults(ArrayRef<const SCEV *> SCEVs) {
       ++I;
   }
 
-  auto RemoveSCEVFromBackedgeMap = [this, &ToForget](
+  auto RemoveSCEVFromBackedgeMap = [&ToForget](
       DenseMap<const Loop *, BackedgeTakenInfo> &Map) {
         for (auto I = Map.begin(), E = Map.end(); I != E;) {
           BackedgeTakenInfo &BEInfo = I->second;