Bug 926083 - Only #include Compiler.h in NullPtr.h if needed; r=froydnj
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 15 Oct 2013 17:13:39 -0400
changeset 164639 1b12502d7c23ab8b7c04cf76e458a8972baf18ac
parent 164638 ce100e906a6eb1aa10969880d978a203bdfd0aff
child 164640 73ac7e81f31696c9ee3d58c64df2aad49177e911
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs926083
milestone27.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 926083 - Only #include Compiler.h in NullPtr.h if needed; r=froydnj
mfbt/NullPtr.h
--- a/mfbt/NullPtr.h
+++ b/mfbt/NullPtr.h
@@ -7,27 +7,26 @@
 /*
  * Implements a workaround for compilers which do not support the C++11 nullptr
  * constant.
  */
 
 #ifndef mozilla_NullPtr_h
 #define mozilla_NullPtr_h
 
-#include "mozilla/Compiler.h"
-
 #if defined(__clang__)
 #  ifndef __has_extension
 #    define __has_extension __has_feature
 #  endif
 #  if __has_extension(cxx_nullptr)
 #    define MOZ_HAVE_CXX11_NULLPTR
 #  endif
 #elif defined(__GNUC__)
 #  if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+#    include "mozilla/Compiler.h"
 #    if MOZ_GCC_VERSION_AT_LEAST(4, 6, 0)
 #      define MOZ_HAVE_CXX11_NULLPTR
 #    endif
 #  endif
 #elif _MSC_VER >= 1600
 # define MOZ_HAVE_CXX11_NULLPTR
 #endif