Move __CLANG_PREREQ to folly/CPortabiilty.h
authorYedidya Feldblum <yfeldblum@fb.com>
Wed, 26 Jul 2017 03:50:18 +0000 (20:50 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 26 Jul 2017 04:11:19 +0000 (21:11 -0700)
Summary: [Folly] Move `__CLANG_PREREQ` to `folly/CPortabiilty.h`.

Reviewed By: Orvid

Differential Revision: D5496372

fbshipit-source-id: 710af3d30aa8bd0e5f645beede354e3463f1bb25

folly/CPortability.h
folly/Portability.h

index 1a47d2518ad6d447260da0a4c6e4ef69cd2c1f34..ca5070a0f551991d6bf541c775aab7798f0458be 100644 (file)
 # endif
 #endif
 
+// portable version check for clang
+#ifndef __CLANG_PREREQ
+# if defined __clang__ && defined __clang_major__ && defined __clang_minor__
+/* nolint */
+#  define __CLANG_PREREQ(maj, min) \
+    ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
+# else
+/* nolint */
+#  define __CLANG_PREREQ(maj, min) 0
+# endif
+#endif
+
 /* Define a convenience macro to test when address sanitizer is being used
  * across the different compilers (e.g. clang, gcc) */
 #if defined(__clang__)
index 04d1848dcfce923a14f123e9c676a66c2155e445..423c9a2ca0439a0dae217580c9149f9278eab3d5 100644 (file)
@@ -247,18 +247,6 @@ constexpr bool kIsSanitizeThread = false;
 #define FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS /* empty */
 #endif
 
-// portable version check for clang
-#ifndef __CLANG_PREREQ
-# if defined __clang__ && defined __clang_major__ && defined __clang_minor__
-/* nolint */
-#  define __CLANG_PREREQ(maj, min) \
-    ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
-# else
-/* nolint */
-#  define __CLANG_PREREQ(maj, min) 0
-# endif
-#endif
-
 /* Platform specific TLS support
  * gcc implements __thread
  * msvc implements __declspec(thread)