Title: [101443] trunk/Source/_javascript_Core
- Revision
- 101443
- Author
- wei...@apple.com
- Date
- 2011-11-29 19:05:09 -0800 (Tue, 29 Nov 2011)
Log Message
Add COMPILER_SUPPORTS macro to allow for compiler feature testing
https://bugs.webkit.org/show_bug.cgi?id=73386
Reviewed by Anders Carlsson.
* wtf/Compiler.h:
Add COMPILER_SUPPORTS and #defines for C++11 variadic templates and
rvalue references for Clang.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (101442 => 101443)
--- trunk/Source/_javascript_Core/ChangeLog 2011-11-30 02:29:34 UTC (rev 101442)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-11-30 03:05:09 UTC (rev 101443)
@@ -1,3 +1,14 @@
+2011-11-29 Sam Weinig <s...@webkit.org>
+
+ Add COMPILER_SUPPORTS macro to allow for compiler feature testing
+ https://bugs.webkit.org/show_bug.cgi?id=73386
+
+ Reviewed by Anders Carlsson.
+
+ * wtf/Compiler.h:
+ Add COMPILER_SUPPORTS and #defines for C++11 variadic templates and
+ rvalue references for Clang.
+
2011-11-29 Oliver Hunt <oli...@apple.com>
Allow WebCore to describe typed arrays to JSC
Modified: trunk/Source/_javascript_Core/wtf/Compiler.h (101442 => 101443)
--- trunk/Source/_javascript_Core/wtf/Compiler.h 2011-11-30 02:29:34 UTC (rev 101442)
+++ trunk/Source/_javascript_Core/wtf/Compiler.h 2011-11-30 03:05:09 UTC (rev 101443)
@@ -29,6 +29,9 @@
/* COMPILER() - the compiler being used to build the project */
#define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_##WTF_FEATURE && WTF_COMPILER_##WTF_FEATURE)
+/* COMPILER_SUPPORTS() - whether the compiler being used to build the project supports the given feature. */
+#define COMPILER_SUPPORTS(WTF_COMPILER_FEATURE) (defined WTF_COMPILER_SUPPORTS_##WTF_COMPILER_FEATURE && WTF_COMPILER_SUPPORTS_##WTF_COMPILER_FEATURE)
+
/* ==== COMPILER() - the compiler being used to build the project ==== */
/* COMPILER(CLANG) - Clang */
@@ -39,6 +42,9 @@
#define __has_extension __has_feature /* Compatibility with older versions of clang */
#endif
+#define WTF_COMPILER_SUPPORTS_CXX_VARIADIC_TEMPLATES __has_feature(cxx_variadic_templates)
+#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
+
#endif
/* COMPILER(MSVC) - Microsoft Visual C++ */
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes