projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Support folly::assume under MSVC
[folly.git]
/
folly
/
Assume.h
diff --git
a/folly/Assume.h
b/folly/Assume.h
index 7c50a679f0fa6111273ee259fa1873c3c7ee8b32..8f8074333c2db293b4227372fb8976a0037b9130 100644
(file)
--- 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