diff options
| author | Craig Topper <craig.topper@gmail.com> | 2016-01-03 19:43:20 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2016-01-03 19:43:20 +0000 |
| commit | a346705b06441e228ec9937cb82d4181dc591237 (patch) | |
| tree | fce460b4e537276f2acbc0a5719ee5ab7e87f154 /clang/lib/CodeGen | |
| parent | 76c3f38774056cdbdce94701c962df8bdf9618ee (diff) | |
| download | bcm5719-llvm-a346705b06441e228ec9937cb82d4181dc591237.tar.gz bcm5719-llvm-a346705b06441e228ec9937cb82d4181dc591237.zip | |
Use std::is_sorted instead of a manual loop. NFC
llvm-svn: 256717
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 5f3ebbd7576..e30b2875f20 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -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); |

