From 553491a54cdb842ab583942e1058cbdcedd32018 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Mon, 12 Dec 2022 13:15:40 -0800 Subject: Only build the section of flag_benchmark used for viewing the disassembly under LLVM. Due to the issue described in https://github.com/abseil/abseil-cpp/issues/1340 and https://github.com/google/benchmark/commit/8545dfb3ea301f5c77626a046d4756ef9f2e4970 it no longer builds under GCC. The other changes are necessary to fix the build using the latest benchmark snapshot Fixes #1340 PiperOrigin-RevId: 494809290 Change-Id: I4a03b2e2dcbdc273e59f1f09f204322e388e7cea --- absl/numeric/bits_benchmark.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'absl/numeric') diff --git a/absl/numeric/bits_benchmark.cc b/absl/numeric/bits_benchmark.cc index 719bfa81..1b7f35dd 100644 --- a/absl/numeric/bits_benchmark.cc +++ b/absl/numeric/bits_benchmark.cc @@ -34,7 +34,7 @@ static void BM_bitwidth(benchmark::State& state) { values.push_back(absl::Uniform(rng, 0, std::numeric_limits::max())); } - while (state.KeepRunningBatch(count)) { + while (state.KeepRunningBatch(static_cast(count))) { for (size_t i = 0; i < count; ++i) { benchmark::DoNotOptimize(values[i]); } @@ -56,7 +56,7 @@ static void BM_bitwidth_nonzero(benchmark::State& state) { values.push_back(absl::Uniform(rng, 1, std::numeric_limits::max())); } - while (state.KeepRunningBatch(count)) { + while (state.KeepRunningBatch(static_cast(count))) { for (size_t i = 0; i < count; ++i) { const T value = values[i]; ABSL_ASSUME(value > 0); -- cgit v1.2.3