[llvm] r313269 - [tblgen] Remove uses of std::ptr_fun, it's removed in C++17.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 09:30:31 PDT 2017
Author: d0k
Date: Thu Sep 14 09:30:31 2017
New Revision: 313269
URL: http://llvm.org/viewvc/llvm-project?rev=313269&view=rev
Log:
[tblgen] Remove uses of std::ptr_fun, it's removed in C++17.
No functionality change intended.
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=313269&r1=313268&r2=313269&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Thu Sep 14 09:30:31 2017
@@ -239,8 +239,7 @@ bool EEVT::TypeSet::EnforceInteger(TreeP
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
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(TreePa
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(TreePa
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, '" +
More information about the llvm-commits
mailing list