Internal change

PiperOrigin-RevId: 612549494
pull/16003/head
Mike Kruskal 9 months ago committed by Copybara-Service
parent 9e7cff0629
commit c78b189609
  1. 8
      protos_generator/protoc-gen-upb-protos.cc

@ -37,8 +37,7 @@ void WriteTypedefForwardingHeader(
const protobuf::FileDescriptor* file,
const std::vector<const protobuf::Descriptor*>& file_messages,
Output& output);
void WriteHeaderMessageForwardDecls(
const protobuf::FileDescriptor* file,
void WriteHeaderMessageForwardDecls(const protobuf::FileDescriptor* file,
Output& output);
class Generator : public protoc::CodeGenerator {
@ -63,6 +62,8 @@ bool Generator::Generate(const protobuf::FileDescriptor* file,
for (const auto& pair : params) {
if (pair.first == "fasttable") {
fasttable_enabled = true;
} else if (pair.first == "experimental_strip_nonfunctional_codegen") {
continue;
} else {
*error = "Unknown parameter: " + pair.first;
return false;
@ -237,8 +238,7 @@ void WriteTypedefForwardingHeader(
}
/// Writes includes for upb C minitables and fwd.h for transitive typedefs.
void WriteHeaderMessageForwardDecls(
const protobuf::FileDescriptor* file,
void WriteHeaderMessageForwardDecls(const protobuf::FileDescriptor* file,
Output& output) {
// Import forward-declaration of types defined in this file.
output("#include \"$0\"\n", UpbCFilename(file));

Loading…
Cancel
Save