From 5a76e633ea9b5adb215e93fdc11e1c0c08b3fc74 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Thu, 17 Nov 2016 16:48:38 -0800 Subject: Integrated internal changes from Google --- src/google/protobuf/wire_format_lite.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/google/protobuf/wire_format_lite.h') diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h index eeb3650f..cfd1688c 100644 --- a/src/google/protobuf/wire_format_lite.h +++ b/src/google/protobuf/wire_format_lite.h @@ -243,7 +243,15 @@ class LIBPROTOBUF_EXPORT WireFormatLite { #define input io::CodedInputStream* input_arg #define output io::CodedOutputStream* output_arg #define field_number int field_number_arg +#ifdef NDEBUG #define INL GOOGLE_ATTRIBUTE_ALWAYS_INLINE +#else +// Avoid excessive inlining in non-optimized builds. Without other optimizations +// the inlining is not going to provide benefits anyway and the huge resulting +// functions, especially in the proto-generated serialization functions, produce +// stack frames so large that many tests run into stack overflows (b/32192897). +#define INL +#endif // Read fields, not including tags. The assumption is that you already // read the tag to determine what field to read. -- cgit v1.2.3