aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/attributes.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-21 14:25:55 -0300
committerJames Almer <jamrial@gmail.com>2017-10-21 14:25:55 -0300
commit072b14f390472ef79a346feb43cf1ae0b372e6d6 (patch)
tree3dafc73afaac1afbe40289a12f1cda665043ac55 /libavutil/attributes.h
parent1ba5e456dd6ecb016746074eb3190842087fb43e (diff)
parent8e2346154e6d58b733fd20326ce706f82fd91b3e (diff)
downloadffmpeg-072b14f390472ef79a346feb43cf1ae0b372e6d6.tar.gz
Merge commit '8e2346154e6d58b733fd20326ce706f82fd91b3e'
* commit '8e2346154e6d58b733fd20326ce706f82fd91b3e': libavutil: Hook up the rest of the gcc specific attributes to clang as well Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/attributes.h')
-rw-r--r--libavutil/attributes.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index e840ce8f79..ced108aa2c 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -66,19 +66,19 @@
# define av_noinline
#endif
-#if AV_GCC_VERSION_AT_LEAST(3,1)
+#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__)
# define av_pure __attribute__((pure))
#else
# define av_pure
#endif
-#if AV_GCC_VERSION_AT_LEAST(2,6)
+#if AV_GCC_VERSION_AT_LEAST(2,6) || defined(__clang__)
# define av_const __attribute__((const))
#else
# define av_const
#endif
-#if AV_GCC_VERSION_AT_LEAST(4,3)
+#if AV_GCC_VERSION_AT_LEAST(4,3) || defined(__clang__)
# define av_cold __attribute__((cold))
#else
# define av_cold
@@ -138,19 +138,19 @@
# define av_used
#endif
-#if AV_GCC_VERSION_AT_LEAST(3,3)
+#if AV_GCC_VERSION_AT_LEAST(3,3) || defined(__clang__)
# define av_alias __attribute__((may_alias))
#else
# define av_alias
#endif
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
# define av_uninit(x) x=x
#else
# define av_uninit(x) x
#endif
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__clang__)
# define av_builtin_constant_p __builtin_constant_p
# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos)))
#else