std::sort and array_pod_sort both use quicksort which is a non-stable sorting
algorithm. This means that the relative order of elements with the same key is
undefined. This patch is an attempt to uncover such scenarios. If LLVM is built
with the macro -DLLVM_SHUFFLE_BEFORE_SORT:BOOL=ON then we randomly shuffle
the container before sorting.
NOTE: To randomly shuffle before std::sort we may have to change all calls
to std::sort with llvm::sort. I am not sure if there is a non-intrusive way to do this. Any ideas?