[PATCH] D44360: [compiler-rt] Change std::sort to llvm::sort in response to r327219

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 16 12:39:40 PDT 2018


efriedma added inline comments.


================
Comment at: lib/asan/tests/asan_mem_test.cc:85
     if (i == 0) continue;
-    sort(v.begin(), v.end());
+    llvm::sort(v.begin(), v.end());
     for (size_t j = 1; j < v.size(); j++) {
----------------
RKSimon wrote:
> Is there any point to checking integer type sorts like this and some of the others in this patch?
"<" for integers forms a strict weak ordering, so yes, it'll always return the same result... but it's simpler to just uniformly use llvm::sort everywhere, rather than forcing developers to consider for each call to sort() whether the element type has a user-defined "operator<".


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D44360





More information about the llvm-commits mailing list