Mark some functions as always_inline with GCC and ICC.
authorThiago Macieira <thiago.macieira@intel.com>
Thu, 29 Dec 2011 17:12:59 +0000 (15:12 -0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 24 Apr 2012 14:38:02 +0000 (16:38 +0200)
These functions are too critical to be called. They should always be
inlined.

Change-Id: I698dc6d83e02c323759c6d066f17993340bd53a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/painting/qdrawhelper_p.h

index 2e9f064..8d67e69 100644 (file)
@@ -71,6 +71,9 @@ QT_BEGIN_NAMESPACE
 // RVCT doesn't like static template functions
 #  define Q_STATIC_TEMPLATE_FUNCTION
 #  define Q_STATIC_INLINE_FUNCTION static __forceinline
+#elif defined(Q_CC_GNU)
+#  define Q_STATIC_TEMPLATE_FUNCTION static __attribute__((always_inline))
+#  define Q_STATIC_INLINE_FUNCTION static inline __attribute__((always_inline))
 #else
 #  define Q_STATIC_TEMPLATE_FUNCTION static
 #  define Q_STATIC_INLINE_FUNCTION static inline