aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/message.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/message.cc')
-rw-r--r--src/google/protobuf/message.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc
index 276d7de5..123bd789 100644
--- a/src/google/protobuf/message.cc
+++ b/src/google/protobuf/message.cc
@@ -52,6 +52,7 @@
#include <google/protobuf/stubs/map_util.h>
#include <google/protobuf/stubs/singleton.h>
#include <google/protobuf/stubs/stl_util.h>
+#include <google/protobuf/stubs/port.h>
namespace google {
namespace protobuf {
@@ -466,6 +467,10 @@ struct ShutdownRepeatedFieldRegister {
namespace internal {
template<>
+#if defined(_MSC_VER) && (_MSC_VER >= 1900)
+// Note: force noinline to workaround MSVC 2015 compiler bug, issue #240
+GOOGLE_ATTRIBUTE_NOINLINE
+#endif
Message* GenericTypeHandler<Message>::NewFromPrototype(
const Message* prototype, google::protobuf::Arena* arena) {
return prototype->New(arena);