forked from OSchip/llvm-project
Use std::is_sorted instead of a manual loop. NFC
llvm-svn: 256717
This commit is contained in:
parent
76c3f38774
commit
a346705b06
clang/lib/CodeGen
|
@ -4770,11 +4770,7 @@ llvm::Constant *IvarLayoutBuilder::buildBitmap(CGObjCCommonMac &CGObjC,
|
||||||
// This isn't a stable sort, but our algorithm should handle it fine.
|
// This isn't a stable sort, but our algorithm should handle it fine.
|
||||||
llvm::array_pod_sort(IvarsInfo.begin(), IvarsInfo.end());
|
llvm::array_pod_sort(IvarsInfo.begin(), IvarsInfo.end());
|
||||||
} else {
|
} else {
|
||||||
#ifndef NDEBUG
|
assert(std::is_sorted(IvarsInfo.begin(), IvarsInfo.end()));
|
||||||
for (unsigned i = 1; i != IvarsInfo.size(); ++i) {
|
|
||||||
assert(IvarsInfo[i - 1].Offset <= IvarsInfo[i].Offset);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
assert(IvarsInfo.back().Offset < InstanceEnd);
|
assert(IvarsInfo.back().Offset < InstanceEnd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue