Upgrade linux protobuf

This commit is contained in:
John Colvin committed 2021-12-12 15:56:55 -05:00
1 parent 79f2f356d5
commit 0f3130fb47
689 files changed
+141922 -132057

No files matched your search

@@ -35,23 +35,25 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__
#define GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__
#include <string>
#include <map>
#include <string>
#include <google/protobuf/compiler/java/java_field.h>
namespace google {
namespace protobuf {
namespace compiler {
namespace java {
class Context; // context.h
class ClassNameResolver; // name_resolver.h
}
}
namespace io {
class Printer; // printer.h
}
namespace compiler {
namespace java {
class Context; // context.h
class ClassNameResolver; // name_resolver.h
} // namespace java
} // namespace compiler
namespace io {
class Printer; // printer.h
}
} // namespace protobuf
} // namespace google
namespace google {
namespace protobuf {
namespace compiler {
namespace java {
@@ -66,8 +68,8 @@ class MessageGenerator {
// All static variables have to be declared at the top-level of the file
// so that we can control initialization order, which is important for
// DescriptorProto bootstrapping to work.
virtual void GenerateStaticVariables(
io::Printer* printer, int* bytecode_estimate) = 0;
virtual void GenerateStaticVariables(io::Printer* printer,
int* bytecode_estimate) = 0;
// Output code which initializes the static variables generated by
// GenerateStaticVariables(). Returns an estimate of bytecode size.
@@ -76,15 +78,20 @@ class MessageGenerator {
// Generate the class itself.
virtual void Generate(io::Printer* printer) = 0;
// Generates the base interface that both the class and its builder implement
// Generates the base interface that both the class and its builder
// implement
virtual void GenerateInterface(io::Printer* printer) = 0;
// Generate code to register all contained extensions with an
// ExtensionRegistry.
virtual void GenerateExtensionRegistrationCode(io::Printer* printer) = 0;
virtual void GenerateKotlinDsl(io::Printer* printer) const = 0;
virtual void GenerateKotlinMembers(io::Printer* printer) const = 0;
virtual void GenerateTopLevelKotlinMembers(io::Printer* printer) const = 0;
protected:
const Descriptor* descriptor_;
std::set<const OneofDescriptor*> oneofs_;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
@@ -95,17 +102,19 @@ class ImmutableMessageGenerator : public MessageGenerator {
ImmutableMessageGenerator(const Descriptor* descriptor, Context* context);
virtual ~ImmutableMessageGenerator();
virtual void Generate(io::Printer* printer);
virtual void GenerateInterface(io::Printer* printer);
virtual void GenerateExtensionRegistrationCode(io::Printer* printer);
virtual void GenerateStaticVariables(
io::Printer* printer, int* bytecode_estimate);
void Generate(io::Printer* printer) override;
void GenerateInterface(io::Printer* printer) override;
void GenerateExtensionRegistrationCode(io::Printer* printer) override;
void GenerateStaticVariables(io::Printer* printer,
int* bytecode_estimate) override;
// Returns an estimate of the number of bytes the printed code will compile to
virtual int GenerateStaticVariableInitializers(io::Printer* printer);
int GenerateStaticVariableInitializers(io::Printer* printer) override;
void GenerateKotlinDsl(io::Printer* printer) const override;
void GenerateKotlinMembers(io::Printer* printer) const override;
void GenerateTopLevelKotlinMembers(io::Printer* printer) const override;
private:
void GenerateFieldAccessorTable(io::Printer* printer, int* bytecode_estimate);
// Returns an estimate of the number of bytes the printed code will compile to
@@ -125,6 +134,8 @@ class ImmutableMessageGenerator : public MessageGenerator {
void GenerateEqualsAndHashCode(io::Printer* printer);
void GenerateParser(io::Printer* printer);
void GenerateParsingConstructor(io::Printer* printer);
void GenerateMutableCopy(io::Printer* printer);
void GenerateKotlinExtensions(io::Printer* printer) const;
void GenerateAnyMethods(io::Printer* printer);
Context* context_;
@@ -137,6 +148,6 @@ class ImmutableMessageGenerator : public MessageGenerator {
} // namespace java
} // namespace compiler
} // namespace protobuf
} // namespace google
#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__