From 0558fb60f996b14a826e70170781b5afcde5f5bf Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Mon, 23 May 2016 17:30:29 -0700 Subject: [PATCH] Support folly::assume under MSVC Summary: Actually __assume when we assume. Reviewed By: meyering Differential Revision: D3336033 fbshipit-source-id: 6c931e9f832dd1d861d03e3ad8e308f612522401 --- folly/Assume.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/folly/Assume.h b/folly/Assume.h index 7c50a679..8f807433 100644 --- a/folly/Assume.h +++ b/folly/Assume.h @@ -38,6 +38,8 @@ FOLLY_ALWAYS_INLINE void assume(bool cond) { __builtin_assume(cond); #elif defined(__GNUC__) if (!cond) { __builtin_unreachable(); } +#elif defined(_MSC_VER) + __assume(cond); #else // Do nothing. #endif -- 2.34.1