| #include "benchmark/benchmark.h" |
| std::uint64_t double_up(const std::uint64_t x) __attribute__((const)); |
| std::uint64_t double_up(const std::uint64_t x) { return x * 2; } |
| // this test verifies compilation of DoNotOptimize() for some types |
| benchmark::DoNotOptimize(buffer8); |
| benchmark::DoNotOptimize(buffer20); |
| benchmark::DoNotOptimize(buffer1024); |
| benchmark::DoNotOptimize(&buffer1024[0]); |
| benchmark::DoNotOptimize(x); |
| benchmark::DoNotOptimize(&x); |
| benchmark::DoNotOptimize(x += 42); |
| benchmark::DoNotOptimize(double_up(x)); |