From f5a93699cb89ddc9f61449204b8de84840792cb6 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 27 Aug 2019 08:29:17 +0100 Subject: [PATCH] xrt: Add XRT_NO_INLINE define --- src/xrt/include/xrt/xrt_compiler.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/xrt/include/xrt/xrt_compiler.h b/src/xrt/include/xrt/xrt_compiler.h index 3968fee99..e55c3c4a7 100644 --- a/src/xrt/include/xrt/xrt_compiler.h +++ b/src/xrt/include/xrt/xrt_compiler.h @@ -43,6 +43,17 @@ #define XRT_MAYBE_UNUSED #endif + +/* + * To stop inlining. + */ +#if defined(__GNUC__) +#define XRT_NO_INLINE __attribute__((noinline)) +#else +#define XRT_NO_INLINE +#endif + + /*! * @define XRT_DEBUGBREAK() * To trigger a trap/break in the debugger.