diff options
author | 0xAAE <avramenko.a@gmail.com> | 2015-09-15 01:46:28 +0300 |
---|---|---|
committer | 0xAAE <avramenko.a@gmail.com> | 2015-09-15 01:46:28 +0300 |
commit | d41a3d630c529c61a1a01ba95867965744b4cc12 (patch) | |
tree | eece39efb652a51a6fe3e313bae890dc9c8f45da /src/google/protobuf/message.cc | |
parent | fbabf987e671aa37d11e1163e0175f99b32df5fe (diff) | |
download | protobuf-d41a3d630c529c61a1a01ba95867965744b4cc12.tar.gz protobuf-d41a3d630c529c61a1a01ba95867965744b4cc12.tar.bz2 protobuf-d41a3d630c529c61a1a01ba95867965744b4cc12.zip |
Add GOOGLE_ATTRIBUTE_NOINLINE to GetArena() and GetMaybeArenaPointer() methods. This is to avoid "unresolved link" errors in MSVC 2015 during Release build
Diffstat (limited to 'src/google/protobuf/message.cc')
-rw-r--r-- | src/google/protobuf/message.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc index 2f6416d0..9a586783 100644 --- a/src/google/protobuf/message.cc +++ b/src/google/protobuf/message.cc @@ -495,11 +495,19 @@ Message* GenericTypeHandler<Message>::NewFromPrototype( return prototype->New(arena); } template<> +#if defined(_MSC_VER) && (_MSC_VER >= 1900) +// Note: force noinline to workaround MSVC 2015 compiler bug, issue #240 +GOOGLE_ATTRIBUTE_NOINLINE +#endif google::protobuf::Arena* GenericTypeHandler<Message>::GetArena( Message* value) { return value->GetArena(); } template<> +#if defined(_MSC_VER) && (_MSC_VER >= 1900) +// Note: force noinline to workaround MSVC 2015 compiler bug, issue #240 +GOOGLE_ATTRIBUTE_NOINLINE +#endif void* GenericTypeHandler<Message>::GetMaybeArenaPointer( Message* value) { return value->GetMaybeArenaPointer(); |