Bug 1022049. Switch to <intrin.h>. r=nfroyd
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Mon, 09 Jun 2014 17:26:55 -0400
changeset 208682 e19324807568e9b57b3494e688da4755aebb16b2
parent 208681 8a0e868c47c205521705a5932cb7c45038dbb3b8
child 208683 00d5164a4049ae3686aeb4e78df0b894778a2050
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfroyd
bugs1022049
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1022049. Switch to <intrin.h>. r=nfroyd Instead of declaring these ourselves just use intrin.h This has the advantage of allowing them to work with clang-cl
mfbt/MathAlgorithms.h
netwerk/protocol/http/HttpChannelChild.h
--- a/mfbt/MathAlgorithms.h
+++ b/mfbt/MathAlgorithms.h
@@ -143,28 +143,23 @@ Abs<long double>(const long double d)
   return std::fabs(d);
 }
 
 } // namespace mozilla
 
 #if defined(_WIN32) && (_MSC_VER >= 1300) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64))
 #  define MOZ_BITSCAN_WINDOWS
 
-  extern "C" {
-    unsigned char _BitScanForward(unsigned long* Index, unsigned long mask);
-    unsigned char _BitScanReverse(unsigned long* Index, unsigned long mask);
+#  include <intrin.h>
 #  pragma intrinsic(_BitScanForward, _BitScanReverse)
 
 #  if defined(_M_AMD64) || defined(_M_X64)
 #    define MOZ_BITSCAN_WINDOWS64
-    unsigned char _BitScanForward64(unsigned long* index, unsigned __int64 mask);
-    unsigned char _BitScanReverse64(unsigned long* index, unsigned __int64 mask);
 #   pragma intrinsic(_BitScanForward64, _BitScanReverse64)
 #  endif
-  } // extern "C"
 
 #endif
 
 namespace mozilla {
 
 namespace detail {
 
 #if defined(MOZ_BITSCAN_WINDOWS)
--- a/netwerk/protocol/http/HttpChannelChild.h
+++ b/netwerk/protocol/http/HttpChannelChild.h
@@ -28,16 +28,20 @@
 #include "nsIChildChannel.h"
 #include "nsIHttpChannelChild.h"
 #include "nsIDivertableChannel.h"
 #include "mozilla/net/DNS.h"
 
 namespace mozilla {
 namespace net {
 
+#if defined(_MSC_VER) && defined(__clang__)
+// This is needed until http://llvm.org/PR19987 is fixed
+class __multiple_inheritance HttpChannelChild;
+#endif
 class HttpChannelChild : public PHttpChannelChild
                        , public HttpBaseChannel
                        , public HttpAsyncAborter<HttpChannelChild>
                        , public nsICacheInfoChannel
                        , public nsIProxiedChannel
                        , public nsIApplicationCacheChannel
                        , public nsIAsyncVerifyRedirectCallback
                        , public nsIAssociatedContentSecurity