From 5cdf11d2f352cd51e5f6facb20deadd8629f68c9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 24 Mar 2017 23:48:30 +0100 Subject: compat/util: add define for never_inline --- compat/util.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'compat/util.hpp') diff --git a/compat/util.hpp b/compat/util.hpp index 25640483..9439271f 100644 --- a/compat/util.hpp +++ b/compat/util.hpp @@ -67,3 +67,11 @@ auto qptr(xs... args) } template using qshared = QSharedPointer; + +#if defined _MSC_VER +# define OTR_NEVER_INLINE __declspec(noinline) +#elif defined __GNUG__ +# define OTR_NEVER_INLINE __attribute__((noinline)) +#else +# define OTR_NEVER_INLINE +#endif -- cgit v1.2.3