[SCEV] Use lambda instead of std::bind; NFC
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 29 Nov 2015 23:40:57 +0000 (23:40 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 29 Nov 2015 23:40:57 +0000 (23:40 +0000)
The lambda is more readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254276 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 6562acd09ff9fce45c5165293373f092a1312d42..23daeb67d6536cfac035c8744af616706de775f2 100644 (file)
@@ -1957,8 +1957,9 @@ StrengthenNoWrapFlags(ScalarEvolution *SE, SCEVTypes Type,
       ScalarEvolution::maskFlags(Flags, SignOrUnsignMask);
 
   // If FlagNSW is true and all the operands are non-negative, infer FlagNUW.
-  auto IsKnownNonNegative =
-    std::bind(std::mem_fn(&ScalarEvolution::isKnownNonNegative), SE, _1);
+  auto IsKnownNonNegative = [&](const SCEV *S) {
+    return SE->isKnownNonNegative(S);
+  };
 
   if (SignOrUnsignWrap == SCEV::FlagNSW && all_of(Ops, IsKnownNonNegative))
     Flags =