diff options
author | Mathias Stearn <mathias@10gen.com> | 2018-02-26 12:24:33 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2018-03-02 18:17:40 -0500 |
commit | 8a275d29b6e17c37ac66380a7689c80e8a52fbb6 (patch) | |
tree | 698dee5504d34d5844ad32696ed46a9cfd3f3069 /src/third_party | |
parent | 4ecca9951b27cab8588f61c5b4165e5b973dc6f6 (diff) | |
download | mongo-8a275d29b6e17c37ac66380a7689c80e8a52fbb6.tar.gz |
SERVER-33491 Fix benchmark.h compile with -fdirectives-only
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/benchmark-1.3.0/benchmark/include/benchmark/benchmark.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/third_party/benchmark-1.3.0/benchmark/include/benchmark/benchmark.h b/src/third_party/benchmark-1.3.0/benchmark/include/benchmark/benchmark.h index c8360dafa8e..9529fafee18 100644 --- a/src/third_party/benchmark-1.3.0/benchmark/include/benchmark/benchmark.h +++ b/src/third_party/benchmark-1.3.0/benchmark/include/benchmark/benchmark.h @@ -960,7 +960,12 @@ class Fixture : public internal::Benchmark { // Check that __COUNTER__ is defined and that __COUNTER__ increases by 1 // every time it is expanded. X + 1 == X + 0 is used in case X is defined to be // empty. If X is empty the expression becomes (+1 == +0). -#if defined(__COUNTER__) && (__COUNTER__ + 1 == __COUNTER__ + 0) +// +// MONGODB MODIFICATION: all of our supported compilers support __COUNTER__ so we don't need to test +// for it here. This test interferes with -E -fdirectives-only since it is illegal to use +// __COUNTER__ in an #if clause with that flag because its value could change between the partial +// preprocessing and the compile phases. +#if true // defined(__COUNTER__) && (__COUNTER__ + 1 == __COUNTER__ + 0) #define BENCHMARK_PRIVATE_UNIQUE_ID __COUNTER__ #else #define BENCHMARK_PRIVATE_UNIQUE_ID __LINE__ |