blob: ae8aeada1dfacb7e5b1c84a73991491fbc1baa1d [file] [log] [blame]
--- 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"