aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-07-19 10:46:05 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-07-19 10:46:05 +0000
commitb26e2916c937d03bc2d7e273b2df4ffccdb061b4 (patch)
tree4b41469102b33860d6537ea50ace1a5f4ccd29a3 /lib/Transforms
parentee649839a243bb29b59b322203b982b2f132e7c5 (diff)
Replace some explicit compare loops with std::equal.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 95a3b3d7c8..b94dd69deb 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -245,10 +245,7 @@ static bool IsPrefix(const ArgPromotion::IndicesVector &Prefix,
const ArgPromotion::IndicesVector &Longer) {
if (Prefix.size() > Longer.size())
return false;
- for (unsigned i = 0, e = Prefix.size(); i != e; ++i)
- if (Prefix[i] != Longer[i])
- return false;
- return true;
+ return std::equal(Prefix.begin(), Prefix.end(), Longer.begin());
}