[cfe-dev] llvm::sort - A new wrapper to std::sort

Grang, Mandeep Singh via cfe-dev cfe-dev at lists.llvm.org
Fri Apr 13 13:24:10 PDT 2018


r327219 added a new wrapper function called *llvm::sort*. If 
EXPENSIVE_CHECKS is enabled, llvm::sort will randomly shuffle the 
container before invoking std::sort. This will help uncover 
non-deterministic ordering of objects having the same key.

All occurrences of std::sort have been changed to llvm::sort in 
llvm/clang/polly repos.

Going forward please make sure to avoid use of std::sort and instead use 
llvm::sort. Maybe we should add a note on the usage of llvm::sort to the 
LLVM Coding Standards?

Thanks,
Mandeep

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180413/f521f2e5/attachment.html>


More information about the cfe-dev mailing list