Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: third_party/protobuf/patches/0011-uninline_internal_default_instance.patch

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Update to new HEAD (b7632464b4) + restore GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protob uf/compiler/cpp/cpp_message.cc
2 index efc56dd..6743ac5 100644
3 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc
4 +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc
5 @@ -1565,12 +1565,6 @@ GenerateInlineMethods(io::Printer* printer, bool is_inlin e) {
6 "_oneof_case_[$oneof_index$]);\n"
7 "}\n");
8 }
9 -
10 - printer->Print(
11 - "inline const $classname$* $classname$::internal_default_instance() {\n"
12 - " return &$classname$_default_instance_.get();\n"
Peter Kasting 2016/11/22 20:28:23 Is this needed because the relevant _default_insta
jbriance 2016/11/22 22:11:31 Yes, when "is_component_build=true" I get link err
13 - "}\n",
14 - "classname", classname_);
15 }
16
17 void MessageGenerator::
18 @@ -2441,6 +2435,12 @@ GenerateStructors(io::Printer* printer) {
19 "\n",
20 "classname", classname_);
21
22 + printer->Print(
23 + "const $classname$* $classname$::internal_default_instance() {\n"
24 + " return &$classname$_default_instance_.get();\n"
25 + "}\n",
26 + "classname", classname_);
27 +
28 if (SupportsArenas(descriptor_)) {
29 printer->Print(
30 "$classname$* $classname$::New(::google::protobuf::Arena* arena) const {\ n"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698