Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc |
diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc |
index 8d47d4e086999a2105f1aa244f62f9a5e4929b3f..b3ba3a2e5ad340c6bc09194be695b0a0889ace5d 100644 |
--- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc |
+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc |
@@ -77,6 +77,8 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor, |
WireFormat::TagSize(descriptor->number(), descriptor->type())); |
(*variables)["deprecation"] = descriptor->options().deprecated() |
? " PROTOBUF_DEPRECATED" : ""; |
+ (*variables)["deprecated_attr"] = descriptor->options().deprecated() |
+ ? "PROTOBUF_DEPRECATED_ATTR " : ""; |
(*variables)["cppget"] = "Get"; |
@@ -121,6 +123,7 @@ GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const { |
FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor, |
const Options& options) |
: descriptor_(descriptor), |
+ options_(options), |
field_generators_( |
new google::protobuf::scoped_ptr<FieldGenerator>[descriptor->field_count()]) { |
// Construct all the FieldGenerators. |