Fix a FIXME about using std::is_sorted.

llvm-svn: 252691
This commit is contained in:
Eric Christopher 2015-11-11 02:04:08 +00:00
parent e301ba2b48
commit ed60b436d4
1 changed files with 4 additions and 3 deletions

View File

@ -2258,6 +2258,9 @@ struct NeonIntrinsicInfo {
bool operator<(unsigned RHSBuiltinID) const {
return BuiltinID < RHSBuiltinID;
}
bool operator<(const NeonIntrinsicInfo &TE) const {
return BuiltinID < TE.BuiltinID;
}
};
} // end anonymous namespace
@ -2816,9 +2819,7 @@ findNeonIntrinsicInMap(ArrayRef<NeonIntrinsicInfo> IntrinsicMap,
#ifndef NDEBUG
if (!MapProvenSorted) {
// FIXME: use std::is_sorted once C++11 is allowed
for (unsigned i = 0; i < IntrinsicMap.size() - 1; ++i)
assert(IntrinsicMap[i].BuiltinID <= IntrinsicMap[i + 1].BuiltinID);
assert(std::is_sorted(std::begin(IntrinsicMap), std::end(IntrinsicMap)));
MapProvenSorted = true;
}
#endif