Use std::is_sorted instead of a manual loop. NFC

llvm-svn: 256717
This commit is contained in:
Craig Topper 2016-01-03 19:43:20 +00:00
parent 76c3f38774
commit a346705b06
1 changed files with 1 additions and 5 deletions

View File

@ -4770,11 +4770,7 @@ llvm::Constant *IvarLayoutBuilder::buildBitmap(CGObjCCommonMac &CGObjC,
// This isn't a stable sort, but our algorithm should handle it fine.
llvm::array_pod_sort(IvarsInfo.begin(), IvarsInfo.end());
} else {
#ifndef NDEBUG
for (unsigned i = 1; i != IvarsInfo.size(); ++i) {
assert(IvarsInfo[i - 1].Offset <= IvarsInfo[i].Offset);
}
#endif
assert(std::is_sorted(IvarsInfo.begin(), IvarsInfo.end()));
}
assert(IvarsInfo.back().Offset < InstanceEnd);