mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 12:50:49 +08: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 change5858a67f13. [1]41af7c2fdc[2]274a70ed7fSigned-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