]> granicus.if.org Git - llvm/commitdiff
Remove uses of deprecated std::not1.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 17 Sep 2017 11:19:53 +0000 (11:19 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 17 Sep 2017 11:19:53 +0000 (11:19 +0000)
Lambdas are slightly more verbose, but also more readable. No
functionality change intended.

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

utils/TableGen/CodeGenDAGPatterns.cpp

index 8c460d8420491da5b88412439a8b507889e5c34f..86238b6c8479dafd4dad7989bb485efce157fb98 100644 (file)
@@ -147,7 +147,7 @@ template <typename Predicate>
 bool TypeSetByHwMode::constrain(Predicate P) {
   bool Changed = false;
   for (auto &I : *this)
-    Changed |= berase_if(I.second, std::not1(std::ref(P)));
+    Changed |= berase_if(I.second, [&P](MVT VT) { return !P(VT); });
   return Changed;
 }
 
@@ -436,11 +436,11 @@ bool TypeInfer::EnforceSmallerThan(TypeSetByHwMode &Small,
     TypeSetByHwMode::SetType &B = Big.get(M);
 
     if (any_of(S, isIntegerOrPtr) && any_of(S, isIntegerOrPtr)) {
-      auto NotInt = std::not1(std::ref(isIntegerOrPtr));
+      auto NotInt = [](MVT VT) { return !isIntegerOrPtr(VT); };
       Changed |= berase_if(S, NotInt) |
                  berase_if(B, NotInt);
     } else if (any_of(S, isFloatingPoint) && any_of(B, isFloatingPoint)) {
-      auto NotFP = std::not1(std::ref(isFloatingPoint));
+      auto NotFP = [](MVT VT) { return !isFloatingPoint(VT); };
       Changed |= berase_if(S, NotFP) |
                  berase_if(B, NotFP);
     } else if (S.empty() || B.empty()) {