Title: [149978] trunk/Source/WTF
- Revision
- 149978
- Author
- [email protected]
- Date
- 2013-05-12 19:56:24 -0700 (Sun, 12 May 2013)
Log Message
Move UNUSED_PARAM and UNUSED_LABEL macros to Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=115997
Reviewed by Benjamin Poulain.
UnusedParam.h predates Compiler.h and the macros defined there should just go into Compiler.h
* wtf/Compiler.h:
(unusedParam):
* wtf/UnusedParam.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (149977 => 149978)
--- trunk/Source/WTF/ChangeLog 2013-05-13 02:41:35 UTC (rev 149977)
+++ trunk/Source/WTF/ChangeLog 2013-05-13 02:56:24 UTC (rev 149978)
@@ -1,5 +1,18 @@
2013-05-12 Anders Carlsson <[email protected]>
+ Move UNUSED_PARAM and UNUSED_LABEL macros to Compiler.h
+ https://bugs.webkit.org/show_bug.cgi?id=115997
+
+ Reviewed by Benjamin Poulain.
+
+ UnusedParam.h predates Compiler.h and the macros defined there should just go into Compiler.h
+
+ * wtf/Compiler.h:
+ (unusedParam):
+ * wtf/UnusedParam.h:
+
+2013-05-12 Anders Carlsson <[email protected]>
+
Remove Complex.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115989
Modified: trunk/Source/WTF/wtf/Compiler.h (149977 => 149978)
--- trunk/Source/WTF/wtf/Compiler.h 2013-05-13 02:41:35 UTC (rev 149977)
+++ trunk/Source/WTF/wtf/Compiler.h 2013-05-13 02:56:24 UTC (rev 149978)
@@ -175,9 +175,13 @@
#define WTF_COMPILER_SUNCC 1
#endif
+/* ABI */
+#if defined(__ARM_EABI__) || defined(__EABI__)
+#define WTF_COMPILER_SUPPORTS_EABI 1
+#endif
+
/* ==== Compiler features ==== */
-
/* ALWAYS_INLINE */
#ifndef ALWAYS_INLINE
@@ -295,9 +299,28 @@
#endif
#endif
-/* ABI */
-#if defined(__ARM_EABI__) || defined(__EABI__)
-#define WTF_COMPILER_SUPPORTS_EABI 1
+/* UNUSED_PARAM */
+
+#if COMPILER(INTEL) && !(defined(WIN32) || defined(_WIN32)) || COMPILER(RVCT)
+template<typename T>
+inline void unusedParam(T& x) { (void)x; }
+#define UNUSED_PARAM(variable) unusedParam(variable)
+#elif COMPILER(MSVC)
+#define UNUSED_PARAM(variable) (void)&variable
+#else
+#define UNUSED_PARAM(variable) (void)variable
#endif
+/* UNUSED_LABEL */
+
+/* This is to keep the compiler from complaining when for local labels are
+ declared but not referenced. For example, this can happen with code that
+ works with auto-generated code.
+ */
+#if COMPILER(MSVC)
+#define UNUSED_LABEL(label) if (false) goto label
+#else
+#define UNUSED_LABEL(label) UNUSED_PARAM(&& label)
+#endif
+
#endif /* WTF_Compiler_h */
Modified: trunk/Source/WTF/wtf/UnusedParam.h (149977 => 149978)
--- trunk/Source/WTF/wtf/UnusedParam.h 2013-05-13 02:41:35 UTC (rev 149977)
+++ trunk/Source/WTF/wtf/UnusedParam.h 2013-05-13 02:56:24 UTC (rev 149978)
@@ -21,26 +21,6 @@
#ifndef WTF_UnusedParam_h
#define WTF_UnusedParam_h
-#include <wtf/Platform.h>
+/* FIXME: Remove this header */
-#if COMPILER(INTEL) && !OS(WINDOWS) || COMPILER(RVCT)
-template<typename T>
-inline void unusedParam(T& x) { (void)x; }
-#define UNUSED_PARAM(variable) unusedParam(variable)
-#elif COMPILER(MSVC)
-#define UNUSED_PARAM(variable) (void)&variable
-#else
-#define UNUSED_PARAM(variable) (void)variable
-#endif
-
-/* This is to keep the compiler from complaining when for local labels are
- declared but not referenced. For example, this can happen with code that
- works with auto-generated code.
-*/
-#if COMPILER(MSVC)
-#define UNUSED_LABEL(label) if (false) goto label
-#else
-#define UNUSED_LABEL(label) UNUSED_PARAM(&& label)
-#endif
-
#endif /* WTF_UnusedParam_h */
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes