forked from OSchip/llvm-project
remove warnings from google-benchmarks in libcxx
Differential Revision: https://reviews.llvm.org/D25522 Patch written by Aditya Kumar. llvm-svn: 284179
This commit is contained in:
parent
1b09aae82a
commit
622c26389f
|
@ -11,10 +11,11 @@ namespace ContainerBenchmarks {
|
|||
template <class Container, class GenInputs>
|
||||
void BM_ConstructIterIter(benchmark::State& st, Container, GenInputs gen) {
|
||||
auto in = gen(st.range(0));
|
||||
const auto begin = in.begin();
|
||||
const auto end = in.end();
|
||||
benchmark::DoNotOptimize(&in);
|
||||
while (st.KeepRunning()) {
|
||||
Container c(in.begin(), in.end());
|
||||
Container c(begin, end);
|
||||
benchmark::DoNotOptimize(c.data());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ inline std::vector<std::string> getDuplicateStringInputs(size_t N) {
|
|||
|
||||
inline std::vector<std::string> getRandomStringInputs(size_t N) {
|
||||
std::vector<std::string> inputs;
|
||||
for (int i=0; i < N; ++i) {
|
||||
for (size_t i=0; i < N; ++i) {
|
||||
inputs.push_back(getRandomString(1024));
|
||||
}
|
||||
return inputs;
|
||||
|
|
Loading…
Reference in New Issue