]> granicus.if.org Git - llvm/commitdiff
[tblgen] Remove uses of std::ptr_fun, it's removed in C++17.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 14 Sep 2017 16:30:31 +0000 (16:30 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 14 Sep 2017 16:30:31 +0000 (16:30 +0000)
No functionality change intended.

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

utils/TableGen/CodeGenDAGPatterns.cpp

index 4a312a7cdb7dd030e16c0780b15bc13e7f13e421..08c10806dfbafae703eeaf5884754ce6d301ad38 100644 (file)
@@ -239,8 +239,7 @@ bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) {
   TypeSet InputSet(*this);
 
   // Filter out all the fp types.
-  TypeVec.erase(remove_if(TypeVec, std::not1(std::ptr_fun(isInteger))),
-                TypeVec.end());
+  erase_if(TypeVec, [](MVT::SimpleValueType VT) { return !isInteger(VT); });
 
   if (TypeVec.empty()) {
     TP.error("Type inference contradiction found, '" +
@@ -264,8 +263,8 @@ bool EEVT::TypeSet::EnforceFloatingPoint(TreePattern &TP) {
   TypeSet InputSet(*this);
 
   // Filter out all the integer types.
-  TypeVec.erase(remove_if(TypeVec, std::not1(std::ptr_fun(isFloatingPoint))),
-                TypeVec.end());
+  erase_if(TypeVec,
+           [](MVT::SimpleValueType VT) { return !isFloatingPoint(VT); });
 
   if (TypeVec.empty()) {
     TP.error("Type inference contradiction found, '" +
@@ -290,8 +289,7 @@ bool EEVT::TypeSet::EnforceScalar(TreePattern &TP) {
   TypeSet InputSet(*this);
 
   // Filter out all the vector types.
-  TypeVec.erase(remove_if(TypeVec, std::not1(std::ptr_fun(isScalar))),
-                TypeVec.end());
+  erase_if(TypeVec, [](MVT::SimpleValueType VT) { return !isScalar(VT); });
 
   if (TypeVec.empty()) {
     TP.error("Type inference contradiction found, '" +
@@ -314,8 +312,7 @@ bool EEVT::TypeSet::EnforceVector(TreePattern &TP) {
   bool MadeChange = false;
 
   // Filter out all the scalar types.
-  TypeVec.erase(remove_if(TypeVec, std::not1(std::ptr_fun(isVector))),
-                TypeVec.end());
+  erase_if(TypeVec, [](MVT::SimpleValueType VT) { return !isVector(VT); });
 
   if (TypeVec.empty()) {
     TP.error("Type inference contradiction found, '" +