summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-24 23:48:30 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-03-24 23:48:30 +0100
commit5cdf11d2f352cd51e5f6facb20deadd8629f68c9 (patch)
treec2c60f74754dec70f5d49a41f778ce928dfc7f57 /compat
parentd903095d973922761071ea675f380f5c4c3cf2ad (diff)
compat/util: add define for never_inline
Diffstat (limited to 'compat')
-rw-r--r--compat/util.hpp8
1 files changed, 8 insertions, 0 deletions
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<typename t> using qshared = QSharedPointer<t>;
+
+#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