From: Christopher Dykes Date: Tue, 24 May 2016 00:30:29 +0000 (-0700) Subject: Support folly::assume under MSVC X-Git-Tag: 2016.07.26~209 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0558fb60f996b14a826e70170781b5afcde5f5bf;p=folly.git Support folly::assume under MSVC Summary: Actually __assume when we assume. Reviewed By: meyering Differential Revision: D3336033 fbshipit-source-id: 6c931e9f832dd1d861d03e3ad8e308f612522401 --- 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