21 lines
723 B
Diff
21 lines
723 B
Diff
diff --git b/base/third_party/cityhash_v103/src/city_v103.cc a/base/third_party/cityhash_v103/src/city_v103.cc
|
|
index b01f42925afe5..e2d276fabf784 100644
|
|
--- a/base/third_party/cityhash_v103/src/city_v103.cc
|
|
+++ b/base/third_party/cityhash_v103/src/city_v103.cc
|
|
@@ -58,7 +58,14 @@ static uint32 UNALIGNED_LOAD32(const char* p) {
|
|
|
|
#else
|
|
|
|
-#ifdef _MSC_VER
|
|
+#if defined(__clang__)
|
|
+
|
|
+// Use builtins where possible. On Windows for instance, this may prevent a
|
|
+// function call instead of emitting a single instruction.
|
|
+#define bswap_32(x) __builtin_bswap32(x)
|
|
+#define bswap_64(x) __builtin_bswap64(x)
|
|
+
|
|
+#elif _MSC_VER
|
|
#include <stdlib.h>
|
|
#define bswap_32(x) _byteswap_ulong(x)
|
|
#define bswap_64(x) _byteswap_uint64(x)
|