Bug 1457967: Don't needlessly include smmintrin.h on platforms where we're only using SSE2. r=jrmuizel draft
authorBas Schouten <bschouten@mozilla.com>
Wed, 02 May 2018 19:21:32 +0000
changeset 790781 c23cf47f80e82513c744e21a2b89bbdead1c4085
parent 790185 6876bbcd3c3fb1cb294e5ca45e6a9ecc692f400d
push id108586
push userbschouten@mozilla.com
push dateWed, 02 May 2018 19:22:06 +0000
reviewersjrmuizel
bugs1457967
milestone61.0a1
Bug 1457967: Don't needlessly include smmintrin.h on platforms where we're only using SSE2. r=jrmuizel MozReview-Commit-ID: KcYlUfX3C17
gfx/src/nsRect.h
--- a/gfx/src/nsRect.h
+++ b/gfx/src/nsRect.h
@@ -17,17 +17,21 @@
 #include "mozilla/gfx/Logging.h"
 #include "nsCoord.h"                    // for nscoord, etc
 #include "nsISupportsImpl.h"            // for MOZ_COUNT_CTOR, etc
 #include "nsPoint.h"                    // for nsIntPoint, nsPoint
 #include "nsMargin.h"                   // for nsIntMargin, nsMargin
 #include "nsSize.h"                     // for IntSize, nsSize
 #include "nscore.h"                     // for NS_BUILD_REFCNT_LOGGING
 #if !defined(ANDROID) && (defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2))
+#ifdef defined(_MSC_VER) && !defined(__clang__)
 #include "smmintrin.h"
+#else
+#include "emmintrin.h"
+#endif
 #endif
 
 typedef mozilla::gfx::IntRect nsIntRect;
 
 struct nsRect :
   public mozilla::gfx::BaseRect<nscoord, nsRect, nsPoint, nsSize, nsMargin> {
   typedef mozilla::gfx::BaseRect<nscoord, nsRect, nsPoint, nsSize, nsMargin> Super;