mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avutil/attributes: enable av_flatten when available
This enables av_flatten on Clang in particular.
It was disabled because at the time this attribute was not supported.
It was implemented in Clang/LLVM 3.5 [1].
Use `__has_attribute` to check for availability. This has been added in
Clang 2.9 [2].
This reverts change 5858a67f13.
[1] https://github.com/llvm/llvm-project/commit/41af7c2fdc8cc2ef186669dcb21cac58d5bd69ee
[2] https://github.com/llvm/llvm-project/commit/274a70ed7f4315c83273173fce4c3b0e097958d6
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
@@ -111,7 +111,7 @@
|
||||
# define av_cold
|
||||
#endif
|
||||
|
||||
#if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__)
|
||||
#if (AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__clang__ )) || AV_HAS_ATTRIBUTE(flatten)
|
||||
# define av_flatten __attribute__((flatten))
|
||||
#else
|
||||
# define av_flatten
|
||||
|
||||
Reference in New Issue
Block a user