diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-08-11 21:15:00 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-11 21:15:00 +0000 |
commit | 0a16c228463ca58c7828b5fd9bdd10b3ba612bbf (patch) | |
tree | 761d8030441a22b5acb0f154ff4586eb6679833f /llvm/utils | |
parent | 1b689da04e3f8f2c83b1365853a8af39a27b30ea (diff) | |
download | bcm5719-llvm-0a16c228463ca58c7828b5fd9bdd10b3ba612bbf.tar.gz bcm5719-llvm-0a16c228463ca58c7828b5fd9bdd10b3ba612bbf.zip |
Use range algorithms instead of unpacking begin/end
No functionality change is intended.
llvm-svn: 278417
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index 307a95373c9..f306956457b 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -108,24 +108,24 @@ bool EEVT::TypeSet::FillWithPossibleTypes(TreePattern &TP, /// hasIntegerTypes - Return true if this TypeSet contains iAny or an /// integer value type. bool EEVT::TypeSet::hasIntegerTypes() const { - return std::any_of(TypeVec.begin(), TypeVec.end(), isInteger); + return any_of(TypeVec, isInteger); } /// hasFloatingPointTypes - Return true if this TypeSet contains an fAny or /// a floating point value type. bool EEVT::TypeSet::hasFloatingPointTypes() const { - return std::any_of(TypeVec.begin(), TypeVec.end(), isFloatingPoint); + return any_of(TypeVec, isFloatingPoint); } /// hasScalarTypes - Return true if this TypeSet contains a scalar value type. bool EEVT::TypeSet::hasScalarTypes() const { - return std::any_of(TypeVec.begin(), TypeVec.end(), isScalar); + return any_of(TypeVec, isScalar); } /// hasVectorTypes - Return true if this TypeSet contains a vAny or a vector /// value type. bool EEVT::TypeSet::hasVectorTypes() const { - return std::any_of(TypeVec.begin(), TypeVec.end(), isVector); + return any_of(TypeVec, isVector); } @@ -3602,10 +3602,9 @@ static void CombineChildVariants(TreePatternNode *Orig, // (and GPRC:$a, GPRC:$b) -> (and GPRC:$b, GPRC:$a) // which are the same pattern. Ignore the dups. if (R->canPatternMatch(ErrString, CDP) && - std::none_of(OutVariants.begin(), OutVariants.end(), - [&](TreePatternNode *Variant) { - return R->isIsomorphicTo(Variant, DepVars); - })) + none_of(OutVariants, [&](TreePatternNode *Variant) { + return R->isIsomorphicTo(Variant, DepVars); + })) OutVariants.push_back(R.release()); // Increment indices to the next permutation by incrementing the |