xref: /llvm-project/third-party/benchmark/test/link_main_test.cc (revision a5b797172cc902db166e9a695716fb81405f86e4)
1 #include "benchmark/benchmark.h"
2 
BM_empty(benchmark::State & state)3 void BM_empty(benchmark::State& state) {
4   for (auto _ : state) {
5     auto iterations = double(state.iterations()) * double(state.iterations());
6     benchmark::DoNotOptimize(iterations);
7   }
8 }
9 BENCHMARK(BM_empty);
10