Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1003)

Unified Diff: sky/engine/wtf/BitwiseOperations.h

Issue 714393002: Remove support for MSVC (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/engine/wtf/BitwiseOperations.h
diff --git a/sky/engine/wtf/BitwiseOperations.h b/sky/engine/wtf/BitwiseOperations.h
index 4808efeda69644639885964bba564a44a2477001..41c14acde04338fc8d8990d24aa2e161fd25649e 100644
--- a/sky/engine/wtf/BitwiseOperations.h
+++ b/sky/engine/wtf/BitwiseOperations.h
@@ -42,32 +42,9 @@
#include <stdint.h>
-#if COMPILER(MSVC)
-#include <intrin.h>
-#endif
-
namespace WTF {
-#if COMPILER(MSVC)
-
-ALWAYS_INLINE uint32_t countLeadingZeros32(uint32_t x)
-{
- unsigned long index;
- return LIKELY(_BitScanReverse(&index, x)) ? (31 - index) : 32;
-}
-
-#if CPU(64BIT)
-
-// MSVC only supplies _BitScanForward64 when building for a 64-bit target.
-ALWAYS_INLINE uint64_t countLeadingZeros64(uint64_t x)
-{
- unsigned long index;
- return LIKELY(_BitScanReverse64(&index, x)) ? (63 - index) : 64;
-}
-
-#endif
-
-#elif COMPILER(GCC)
+#if COMPILER(GCC)
// This is very annoying. __builtin_clz has undefined behaviour for an input of
// 0, even though these's clearly a return value that makes sense, and even

Powered by Google App Engine
This is Rietveld 408576698