Commit c9418912 authored by Feng Xiao's avatar Feng Xiao

Merge pull request #813 from 0xAAE/master

Add GOOGLE_ATTRIBUTE_NOINLINE to GetArena() and GetMaybeArenaPointer(…
parents fbabf987 d41a3d63
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment