OSDN Git Service

util: remove redundant check for the __clang__ macro
authorVlad Golovkin <vlad.golovkin.mail@gmail.com>
Tue, 6 Feb 2018 13:48:00 +0000 (06:48 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 6 Feb 2018 22:23:26 +0000 (15:23 -0700)
Clang defines __GNUC__ macro, so one doesn't need to check __clang__
macro in this particular case.

v2: added comment as per Brian Paul's suggestion

Reviewed-by: Brian Paul <brianp@vmware.com>
src/util/macros.h

index 432d513..e3c785a 100644 (file)
@@ -137,8 +137,9 @@ do {                       \
 #endif
 
 /* Forced function inlining */
+/* Note: Clang also sets __GNUC__ (see other cases below) */
 #ifndef ALWAYS_INLINE
-#  if defined(__GNUC__) || defined(__clang__)
+#  if defined(__GNUC__)
 #    define ALWAYS_INLINE inline __attribute__((always_inline))
 #  elif defined(_MSC_VER)
 #    define ALWAYS_INLINE __forceinline