--- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -1216,7 +1216,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { if (SupportsArenas(descriptor_)) { format( - "inline void Swap($classname$* other) {\n" + "PROTOBUF_NOINLINE void Swap($classname$* other) {\n" " if (other == this) return;\n" " if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {\n" " InternalSwap(other);\n"