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:
Sebastian Pop 2016-10-14 00:07:57 +00:00
parent 1b09aae82a
commit 622c26389f
2 changed files with 3 additions and 2 deletions

View File

@ -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());
}
}

View File

@ -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;