Introduce platform-agnostic ALWAYS_INLINE macro

`<attributes.h>` has been included in anticipation of the following
commit.
This commit is contained in:
Hennadii Stepanov
2023-05-04 20:57:51 +01:00
parent 6c7ebcc14b
commit e16c22fe02
4 changed files with 12 additions and 0 deletions

View File

@@ -16,4 +16,12 @@
# define LIFETIMEBOUND
#endif
#if defined(__GNUC__)
# define ALWAYS_INLINE inline __attribute__((always_inline))
#elif defined(_MSC_VER)
# define ALWAYS_INLINE __forceinline
#else
# error No known always_inline attribute for this platform.
#endif
#endif // BITCOIN_ATTRIBUTES_H