From 3bd691a4975b2267ff04611507e766a7f9f87e83 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 8 May 2015 16:56:29 -0700 Subject: Google-internal development. --- upb/upb.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'upb/upb.h') diff --git a/upb/upb.h b/upb/upb.h index 3744ea6..13efaed 100644 --- a/upb/upb.h +++ b/upb/upb.h @@ -25,6 +25,15 @@ #define UPB_INLINE static inline #endif +// For use in C/C++ source files (not headers), forces inlining within the file. +#ifdef __GNUC__ +#define UPB_FORCEINLINE inline __attribute__((always_inline)) +#define UPB_NOINLINE __attribute__((noinline)) +#else +#define UPB_FORCEINLINE +#define UPB_NOINLINE +#endif + #if __STDC_VERSION__ >= 199901L #define UPB_C99 #endif -- cgit v1.2.3