summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-09-14 16:30:31 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-09-14 16:30:31 +0000
commitd7b2aae1695d450e8bce0121be5ff93177d175ee (patch)
treecc7e95180401c253d27416f6349dbc005f529fe0
parent6ca02b25a74265d879fa0712569a85ff68035070 (diff)
downloadbcm5719-llvm-d7b2aae1695d450e8bce0121be5ff93177d175ee.tar.gz
bcm5719-llvm-d7b2aae1695d450e8bce0121be5ff93177d175ee.zip
[tblgen] Remove uses of std::ptr_fun, it's removed in C++17.
No functionality change intended. llvm-svn: 313269
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 4a312a7cdb7..08c10806dfb 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -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, '" +
OpenPOWER on IntegriCloud