You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-06 05:47:18 +02:00
avutil/attributes: prefer clang attributes even in non-gnu builds
In MSVC mode Clang doesn't define __GNUC__, but we can still attributes. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
committed by
Niklas Haas
parent
b7ab357db4
commit
941eae01b1
@@ -49,7 +49,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef av_always_inline
|
#ifndef av_always_inline
|
||||||
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__)
|
||||||
# define av_always_inline __attribute__((always_inline)) inline
|
# define av_always_inline __attribute__((always_inline)) inline
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
# define av_always_inline __forceinline
|
# define av_always_inline __forceinline
|
||||||
@@ -68,13 +68,13 @@
|
|||||||
|
|
||||||
#if AV_HAS_STD_ATTRIBUTE(nodiscard)
|
#if AV_HAS_STD_ATTRIBUTE(nodiscard)
|
||||||
# define av_warn_unused_result [[nodiscard]]
|
# define av_warn_unused_result [[nodiscard]]
|
||||||
#elif AV_GCC_VERSION_AT_LEAST(3,4)
|
#elif AV_GCC_VERSION_AT_LEAST(3,4) || defined(__clang__)
|
||||||
# define av_warn_unused_result __attribute__((warn_unused_result))
|
# define av_warn_unused_result __attribute__((warn_unused_result))
|
||||||
#else
|
#else
|
||||||
# define av_warn_unused_result
|
# define av_warn_unused_result
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__)
|
||||||
# define av_noinline __attribute__((noinline))
|
# define av_noinline __attribute__((noinline))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
# define av_noinline __declspec(noinline)
|
# define av_noinline __declspec(noinline)
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
#if AV_HAS_STD_ATTRIBUTE(deprecated)
|
#if AV_HAS_STD_ATTRIBUTE(deprecated)
|
||||||
# define attribute_deprecated [[deprecated]]
|
# define attribute_deprecated [[deprecated]]
|
||||||
#elif AV_GCC_VERSION_AT_LEAST(3,1)
|
#elif AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__)
|
||||||
# define attribute_deprecated __attribute__((deprecated))
|
# define attribute_deprecated __attribute__((deprecated))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
# define attribute_deprecated __declspec(deprecated)
|
# define attribute_deprecated __declspec(deprecated)
|
||||||
|
Reference in New Issue
Block a user