From 098b61c3a0ef4c594773ebf84533a81205115ddc Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 31 Aug 2019 08:52:14 -0400 Subject: Add BOTAN_FORCE_INLINE and use it in BLAKE2b Closes #2089 --- src/lib/utils/compiler.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/lib/utils') diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h index 5cf1f1f41..503cd3754 100644 --- a/src/lib/utils/compiler.h +++ b/src/lib/utils/compiler.h @@ -177,6 +177,23 @@ #endif +/* +* Define BOTAN_FORCE_INLINE +*/ +#if !defined(BOTAN_FORCE_INLINE) + + #if defined (__clang__) || defined (__GNUC__) + #define BOTAN_FORCE_INLINE __attribute__ ((__always_inline__)) + + #elif defined (_MSC_VER) + #define BOTAN_FORCE_INLINE __forceinline + + #else + #define BOTAN_FORCE_INLINE inline + #endif + +#endif + /* * Define BOTAN_PARALLEL_SIMD_FOR */ -- cgit v1.2.3