openMSX
inline.hh
Go to the documentation of this file.
1#ifndef INLINE_HH
2#define INLINE_HH
3
4#ifdef __GNUC__
5#define ALWAYS_INLINE inline __attribute__((always_inline))
6#define NEVER_INLINE __attribute__((noinline))
7
8#elif defined _MSC_VER && 0
9// Enabling these macros appears to make openmsx about 5% slower
10// when compiled with VC++ for x64. Hence we leave the defaults
11#define ALWAYS_INLINE __forceinline
12#define NEVER_INLINE __declspec(noinline)
13
14#else
15// Fallback
16#define ALWAYS_INLINE inline
17#define NEVER_INLINE
18
19#endif
20
21#endif