diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2019-11-19 13:54:12 -0800 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-11-19 16:13:12 -0800 |
| commit | 10089ce2027ac15fc04427189b3b22ccec4d8535 (patch) | |
| tree | 8deb37731ad0f8448f9c2c31e2b9151b4dcc8173 /compiler-rt | |
| parent | 69242e986823e3fdd11a8e51f47f36bec714363c (diff) | |
| download | bcm5719-llvm-10089ce2027ac15fc04427189b3b22ccec4d8535.tar.gz bcm5719-llvm-10089ce2027ac15fc04427189b3b22ccec4d8535.zip | |
scudo: Switch from std::random_shuffle to std::shuffle in a test.
This lets the test build with C++17.
Differential Revision: https://reviews.llvm.org/D70471
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp b/compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp index be620a6937c..047a61653cb 100644 --- a/compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp @@ -14,6 +14,7 @@ #include <condition_variable> #include <mutex> +#include <random> #include <thread> template <class SecondaryT> static void testSecondaryBasic(void) { @@ -42,7 +43,7 @@ template <class SecondaryT> static void testSecondaryBasic(void) { std::vector<void *> V; for (scudo::uptr I = 0; I < 32U; I++) V.push_back(L->allocate(Size)); - std::random_shuffle(V.begin(), V.end()); + std::shuffle(V.begin(), V.end(), std::mt19937(std::random_device()())); while (!V.empty()) { L->deallocate(V.back()); V.pop_back(); |

