# define EINA_UNLIKELY(exp) __builtin_expect((exp), 0)
# define EINA_LIKELY(exp) __builtin_expect((exp), 1)
# define EINA_SENTINEL __attribute__((__sentinel__))
-# define EINA_PREFETCH(arg) __builtin_prefetch(arg)
-# define EINA_PREFETCH_WRITE(arg) __builtin_prefetch(arg, 1)
-# define EINA_PREFETCH_NOCACHE(arg) __builtin_prefetch(arg, 0, 0)
-# define EINA_PREFETCH_NOCACHE_WRITE(arg) __builtin_prefetch(arg, 1, 0)
+# ifndef __clang__
+# define EINA_PREFETCH(arg) __builtin_prefetch(arg)
+# define EINA_PREFETCH_WRITE(arg) __builtin_prefetch(arg, 1)
+# define EINA_PREFETCH_NOCACHE(arg) __builtin_prefetch(arg, 0, 0)
+# define EINA_PREFETCH_NOCACHE_WRITE(arg) __builtin_prefetch(arg, 1, 0)
+# else
+/* LLVM Clang workaround (crash on compilation) */
+# define EINA_PREFETCH(arg) ((void) (arg))
+# define EINA_PREFETCH_WRITE(arg) ((void) (arg))
+# define EINA_PREFETCH_NOCACHE(arg) ((void) (arg))
+# define EINA_PREFETCH_NOCACHE_WRITE(arg) ((void) (arg))
+# endif
# else
# define EINA_PRINTF(fmt, arg)
# define EINA_SCANF(fmt, arg)
# define EINA_UNLIKELY(exp) exp
# define EINA_LIKELY(exp) exp
# define EINA_SENTINEL
-# define EINA_PREFETCH(arg)
-# define EINA_PREFETCH_WRITE(arg)
-# define EINA_PREFETCH_NOCACHE(arg)
-# define EINA_PREFETCH_NOCACHE_WRITE(arg)
+# define EINA_PREFETCH(arg) ((void) (arg))
+# define EINA_PREFETCH_WRITE(arg) ((void) (arg))
+# define EINA_PREFETCH_NOCACHE(arg) ((void) (arg))
+# define EINA_PREFETCH_NOCACHE_WRITE(arg) ((void) (arg))
# endif
#elif defined(_MSC_VER)
# define EINA_UNLIKELY(exp) exp
# define EINA_LIKELY(exp) exp
# define EINA_SENTINEL
-# define EINA_PREFETCH(arg)
-# define EINA_PREFETCH_WRITE(arg)
-# define EINA_PREFETCH_NOCACHE(arg)
-# define EINA_PREFETCH_NOCACHE_WRITE(arg)
+# define EINA_PREFETCH(arg) ((void) (arg))
+# define EINA_PREFETCH_WRITE(arg) ((void) (arg))
+# define EINA_PREFETCH_NOCACHE(arg) ((void) (arg))
+# define EINA_PREFETCH_NOCACHE_WRITE(arg) ((void) (arg))
#elif defined(__SUNPRO_C)
# define EINA_UNUSED
# define EINA_UNLIKELY(exp) exp
# define EINA_LIKELY(exp) exp
# define EINA_SENTINEL
-# define EINA_PREFETCH(arg)
-# define EINA_PREFETCH_WRITE(arg)
-# define EINA_PREFETCH_NOCACHE(arg)
-# define EINA_PREFETCH_NOCACHE_WRITE(arg)
+# define EINA_PREFETCH(arg) ((void) (arg))
+# define EINA_PREFETCH_WRITE(arg) ((void) (arg))
+# define EINA_PREFETCH_NOCACHE(arg) ((void) (arg))
+# define EINA_PREFETCH_NOCACHE_WRITE(arg) ((void) (arg))
#else /* ! __GNUC__ && ! _MSC_VER && ! __SUNPRO_C */