summaryrefslogtreecommitdiff
path: root/src/third_party/benchmark-1.3.0/patches/0002-Work-around-MSVC-__forceinline-bug.patch
blob: 4bbd33934b3b1cbef43c85844de00b11b8cf548e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From df74ea738d9a797a2f5596c72ff08a2cd895168f Mon Sep 17 00:00:00 2001
From: Robert Guo <robert.guo@10gen.com>
Date: Mon, 22 Jan 2018 18:19:04 -0500
Subject: [PATCH] Work around MSVC __forceinline bug

---
 include/benchmark/benchmark.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h
index d529e4b..f20787b 100644
--- a/include/benchmark/benchmark.h
+++ b/include/benchmark/benchmark.h
@@ -207,7 +207,9 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
 #define BENCHMARK_NOEXCEPT_OP(x) noexcept(x)
 #elif defined(_MSC_VER) && !defined(__clang__)
 #define BENCHMARK_UNUSED
-#define BENCHMARK_ALWAYS_INLINE __forceinline
+// MONGO HACK: SERVER-32908 work around old MSVC bug, which was fixed as of MSVC 1913.
+// See discussion here for more detail: https://github.com/google/benchmark/pull/493
+#define BENCHMARK_ALWAYS_INLINE
 #if _MSC_VER >= 1900
 #define BENCHMARK_NOEXCEPT noexcept
 #define BENCHMARK_NOEXCEPT_OP(x) noexcept(x)
-- 
2.14.3 (Apple Git-98)