openMSX
inline.hh
Go to the documentation of this file.
1 #ifndef INLINE_HH
2 #define INLINE_HH
3 
4 // This inline trick doesn't work on gcc 3.x when using debug flavour
5 // so we only enable it in the other cases.
6 
7 #if __GNUC__ > 3 || (!defined(DEBUG) && __GNUC__ > 2)
8 #define ALWAYS_INLINE inline __attribute__((always_inline))
9 #define NEVER_INLINE __attribute__((noinline))
10 #elif defined _MSC_VER && 0
11 // Enabling these macros appears to make openmsx about 5% slower
12 // when compiled with VC++ for x64. Hence we leave the defaults
13 #define ALWAYS_INLINE __forceinline
14 #define NEVER_INLINE __declspec(noinline)
15 #else
16 #define ALWAYS_INLINE inline
17 #define NEVER_INLINE
18 #endif
19 
20 #endif