Support folly::assume under MSVC
[folly.git] / folly / Assume.h
index 7c50a679f0fa6111273ee259fa1873c3c7ee8b32..8f8074333c2db293b4227372fb8976a0037b9130 100644 (file)
@@ -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