Reduce inlining in debug builds.
Fixes 018-stack-overflow on the host with interpreter.
Change-Id: Ieed091b341b7812cfe898421a74d2f41f6a6a8bc
diff --git a/src/base/macros.h b/src/base/macros.h
index 52013da..48cb9c0 100644
--- a/src/base/macros.h
+++ b/src/base/macros.h
@@ -130,6 +130,12 @@
#define LIKELY(x) __builtin_expect((x), true)
#define UNLIKELY(x) __builtin_expect((x), false)
+#ifdef NDEBUG
+#define ALWAYS_INLINE
+#else
+#define ALWAYS_INLINE __attribute__((always_inline))
+#endif
+
// bionic and glibc both have TEMP_FAILURE_RETRY, but Mac OS' libc doesn't.
#ifndef TEMP_FAILURE_RETRY
#define TEMP_FAILURE_RETRY(exp) ({ \