diff --git a/include/cpptrace/cpptrace.hpp b/include/cpptrace/cpptrace.hpp index 7b406e8..6b3757f 100644 --- a/include/cpptrace/cpptrace.hpp +++ b/include/cpptrace/cpptrace.hpp @@ -21,6 +21,12 @@ #endif #endif +#ifdef _MSC_VER + #define CPPTRACE_FORCE_NO_INLINE __declspec(noinline) +#else + #define CPPTRACE_FORCE_NO_INLINE __attribute__((noinline)) +#endif + namespace cpptrace { struct object_trace; struct stacktrace; diff --git a/src/platform/common.hpp b/src/platform/common.hpp index ae5a443..2223037 100644 --- a/src/platform/common.hpp +++ b/src/platform/common.hpp @@ -1,12 +1,6 @@ #ifndef COMMON_HPP #define COMMON_HPP -#ifdef _MSC_VER - #define CPPTRACE_FORCE_NO_INLINE __declspec(noinline) -#else - #define CPPTRACE_FORCE_NO_INLINE __attribute__((noinline)) -#endif - #define IS_WINDOWS 0 #define IS_LINUX 0 #define IS_APPLE 0