diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-01-08 23:25:06 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-01-08 23:25:06 +0000 |
commit | 9bbba276e9e0515012826ce968b383dd89c65320 (patch) | |
tree | d6ecbb54659d691826605a064b8e6b46494d4e8c /lldb/source/Interpreter/OptionValueArray.cpp | |
parent | 0ad1b71fe37af3f3230b40e03e3a511c78152bad (diff) | |
download | bcm5719-llvm-9bbba276e9e0515012826ce968b383dd89c65320.tar.gz bcm5719-llvm-9bbba276e9e0515012826ce968b383dd89c65320.zip |
Change std::sort to llvm::sort to detect non-determinism.
LLVM added wrappers to std::sort (r327219) that randomly shuffle the
container before sorting. The goal is to uncover non-determinism due to
undefined sorting order of objects having the same key.
This can be enabled with -DLLVM_ENABLE_EXPENSIVE_CHECKS=ON.
llvm-svn: 350679
Diffstat (limited to 'lldb/source/Interpreter/OptionValueArray.cpp')
-rw-r--r-- | lldb/source/Interpreter/OptionValueArray.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/OptionValueArray.cpp b/lldb/source/Interpreter/OptionValueArray.cpp index e405c9500b8..d755fa2fddb 100644 --- a/lldb/source/Interpreter/OptionValueArray.cpp +++ b/lldb/source/Interpreter/OptionValueArray.cpp @@ -221,7 +221,7 @@ Status OptionValueArray::SetArgs(const Args &args, VarSetOperationType op) { if (num_remove_indexes) { // Sort and then erase in reverse so indexes are always valid if (num_remove_indexes > 1) { - std::sort(remove_indexes.begin(), remove_indexes.end()); + llvm::sort(remove_indexes.begin(), remove_indexes.end()); for (std::vector<int>::const_reverse_iterator pos = remove_indexes.rbegin(), end = remove_indexes.rend(); |