Bug 823917 - Use C++11 final on MSVC11. r=waldo
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Thu, 03 Jan 2013 04:47:26 +0900
changeset 126441 001b109e68c46353d6c7f4b943225088eb593eac
parent 126440 793c5c49bd9b8b2a9a6a9a40283bbcc04d252a8c
child 126442 0515eda1f932f00bcb9adc1fe51f35eeb77fff36
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs823917
milestone20.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 823917 - Use C++11 final on MSVC11. r=waldo
mfbt/Attributes.h
--- a/mfbt/Attributes.h
+++ b/mfbt/Attributes.h
@@ -105,25 +105,25 @@
 #      if __GNUC_MINOR__ >= 7
 #        define MOZ_HAVE_CXX11_FINAL     __final
 #      endif
 #    endif
 #  endif
 #  define MOZ_HAVE_NEVER_INLINE          __attribute__((noinline))
 #  define MOZ_HAVE_NORETURN              __attribute__((noreturn))
 #elif defined(_MSC_VER)
-#  if _MSC_VER >= 1400
-#    define MOZ_HAVE_CXX11_OVERRIDE
-     /* MSVC currently spells "final" as "sealed". */
+#  if _MSC_VER >= 1700
+#    define MOZ_HAVE_CXX11_FINAL         final
+#    define MOZ_HAVE_CXX11_STRONG_ENUMS
+#  else
+     /* MSVC <= 10 used to spell "final" as "sealed". */
 #    define MOZ_HAVE_CXX11_FINAL         sealed
-#    define MOZ_HAVE_CXX11_ENUM_TYPE
 #  endif
-#  if _MSC_VER >= 1700
-#    define MOZ_HAVE_CXX11_STRONG_ENUMS
-#  endif
+#  define MOZ_HAVE_CXX11_OVERRIDE
+#  define MOZ_HAVE_CXX11_ENUM_TYPE
 #  define MOZ_HAVE_NEVER_INLINE          __declspec(noinline)
 #  define MOZ_HAVE_NORETURN              __declspec(noreturn)
 #endif
 
 /*
  * MOZ_NEVER_INLINE is a macro which expands to tell the compiler that the
  * method decorated with it must never be inlined, even if the compiler would
  * otherwise choose to inline the method.  Compilers aren't absolutely