xref: /aosp_15_r20/external/cronet/third_party/protobuf/patches/0010-uninline-generated-code.patch (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard Worker--- a/src/google/protobuf/compiler/cpp/message.cc
2*6777b538SAndroid Build Coastguard Worker+++ b/src/google/protobuf/compiler/cpp/message.cc
3*6777b538SAndroid Build Coastguard Worker@@ -1300,7 +1300,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
4*6777b538SAndroid Build Coastguard Worker       "friend void swap($classname$& a, $classname$& b) {\n"
5*6777b538SAndroid Build Coastguard Worker       "  a.Swap(&b);\n"
6*6777b538SAndroid Build Coastguard Worker       "}\n"
7*6777b538SAndroid Build Coastguard Worker-      "inline void Swap($classname$* other) {\n"
8*6777b538SAndroid Build Coastguard Worker+      "PROTOBUF_NOINLINE void Swap($classname$* other) {\n"
9*6777b538SAndroid Build Coastguard Worker       "  if (other == this) return;\n"
10*6777b538SAndroid Build Coastguard Worker       "  if (GetArena() == other->GetArena()) {\n"
11*6777b538SAndroid Build Coastguard Worker       "    InternalSwap(other);\n"
12