diff options
Diffstat (limited to 'libcxx/benchmarks/GenerateInput.hpp')
-rw-r--r-- | libcxx/benchmarks/GenerateInput.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcxx/benchmarks/GenerateInput.hpp b/libcxx/benchmarks/GenerateInput.hpp index 5ddda76afc5..49fb48d9c9e 100644 --- a/libcxx/benchmarks/GenerateInput.hpp +++ b/libcxx/benchmarks/GenerateInput.hpp @@ -130,4 +130,11 @@ inline std::vector<std::string> getReverseSortedStringInputs(size_t N) { return inputs; } +inline std::vector<const char*> getRandomCStringInputs(size_t N) { + static std::vector<std::string> inputs = getRandomStringInputs(N); + std::vector<const char*> cinputs; + for (auto const& str : inputs) + cinputs.push_back(str.c_str()); + return cinputs; +} #endif // BENCHMARK_GENERATE_INPUT_HPP |