From 4bca09dc412e2d6a1bd285c9aad2476486fb43ae Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 17 Sep 2017 11:19:53 +0000 Subject: [PATCH] Remove uses of deprecated std::not1. 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 8c460d84204..86238b6c847 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -147,7 +147,7 @@ template 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()) { -- 2.50.0