Cheats: Prevent inlining of memory functions
Clang is way too eager here and inlines the whole thing hundreds of times within CheatList::Apply().
This commit is contained in:
@ -10,7 +10,6 @@
|
||||
#include <type_traits>
|
||||
|
||||
// Force inline helper
|
||||
#ifndef ALWAYS_INLINE
|
||||
#if defined(_MSC_VER)
|
||||
#define ALWAYS_INLINE __forceinline
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
@ -18,7 +17,6 @@
|
||||
#else
|
||||
#define ALWAYS_INLINE inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Force inline in non-debug helper
|
||||
#ifdef _DEBUG
|
||||
@ -27,6 +25,15 @@
|
||||
#define ALWAYS_INLINE_RELEASE ALWAYS_INLINE
|
||||
#endif
|
||||
|
||||
// Prevent inlining
|
||||
#if defined(_MSC_VER)
|
||||
#define NEVER_INLINE __declspec(noinline)
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
#define NEVER_INLINE __attribute__((noinline))
|
||||
#else
|
||||
#define NEVER_INLINE
|
||||
#endif
|
||||
|
||||
// unreferenced parameter macro
|
||||
#ifndef UNREFERENCED_VARIABLE
|
||||
#if defined(__GNUC__) || defined(__clang__) || defined(__EMSCRIPTEN__)
|
||||
|
||||
Reference in New Issue
Block a user