Merge pull request #17480 from apolcyn/revert_upb

Revert "Changes add a script for generating C code and build rule for…
reviewable/pr17370/r2
apolcyn 6 years ago committed by GitHub
commit a310778ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      BUILD
  2. 53
      CMakeLists.txt
  3. 38
      Makefile
  4. 1
      bazel/grpc_build_system.bzl
  5. 6
      bazel/grpc_deps.bzl
  6. 2
      build.yaml
  7. 19
      grpc.gyp
  8. 24
      src/core/ext/upb-generated/google/protobuf/any.upb.c
  9. 63
      src/core/ext/upb-generated/google/protobuf/any.upb.h
  10. 549
      src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
  11. 1879
      src/core/ext/upb-generated/google/protobuf/descriptor.upb.h
  12. 24
      src/core/ext/upb-generated/google/protobuf/duration.upb.c
  13. 65
      src/core/ext/upb-generated/google/protobuf/duration.upb.h
  14. 88
      src/core/ext/upb-generated/google/protobuf/struct.upb.c
  15. 226
      src/core/ext/upb-generated/google/protobuf/struct.upb.h
  16. 24
      src/core/ext/upb-generated/google/protobuf/timestamp.upb.c
  17. 65
      src/core/ext/upb-generated/google/protobuf/timestamp.upb.h
  18. 87
      src/core/ext/upb-generated/google/protobuf/wrappers.upb.c
  19. 305
      src/core/ext/upb-generated/google/protobuf/wrappers.upb.h
  20. 69
      src/upb/gen_build_yaml.py
  21. 1
      tools/buildgen/generate_build_additions.sh
  22. 38
      tools/codegen/core/gen_upb_api.sh
  23. 14
      tools/distrib/check_copyright.py
  24. 14
      tools/distrib/check_include_guards.py
  25. 21
      tools/run_tests/generated/sources_and_headers.json
  26. 3
      tools/run_tests/sanity/check_port_platform.py

25
BUILD

@ -2274,29 +2274,4 @@ grpc_cc_library(
],
)
# TODO: Get this into build.yaml once we start using it.
grpc_cc_library(
name = "google_protobuf",
srcs = [
"src/core/ext/upb-generated/google/protobuf/any.upb.c",
"src/core/ext/upb-generated/google/protobuf/descriptor.upb.c",
"src/core/ext/upb-generated/google/protobuf/duration.upb.c",
"src/core/ext/upb-generated/google/protobuf/struct.upb.c",
"src/core/ext/upb-generated/google/protobuf/timestamp.upb.c",
"src/core/ext/upb-generated/google/protobuf/wrappers.upb.c",
],
hdrs = [
"src/core/ext/upb-generated/google/protobuf/any.upb.h",
"src/core/ext/upb-generated/google/protobuf/descriptor.upb.h",
"src/core/ext/upb-generated/google/protobuf/duration.upb.h",
"src/core/ext/upb-generated/google/protobuf/struct.upb.h",
"src/core/ext/upb-generated/google/protobuf/timestamp.upb.h",
"src/core/ext/upb-generated/google/protobuf/wrappers.upb.h",
],
language = "c++",
external_deps = [
"upb_lib",
],
)
grpc_generate_one_off_targets()

@ -5478,59 +5478,6 @@ endif()
endif (gRPC_BUILD_CSHARP_EXT)
if (gRPC_BUILD_TESTS)
add_library(upb
third_party/upb/google/protobuf/descriptor.upb.c
third_party/upb/upb/decode.c
third_party/upb/upb/def.c
third_party/upb/upb/encode.c
third_party/upb/upb/handlers.c
third_party/upb/upb/msg.c
third_party/upb/upb/msgfactory.c
third_party/upb/upb/refcounted.c
third_party/upb/upb/sink.c
third_party/upb/upb/table.c
third_party/upb/upb/upb.c
)
if(WIN32 AND MSVC)
set_target_properties(upb PROPERTIES COMPILE_PDB_NAME "upb"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)
if (gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/upb.pdb
DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
)
endif()
endif()
target_include_directories(upb
PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
)
# avoid dependency on libstdc++
if (_gRPC_CORE_NOSTDCXX_FLAGS)
set_target_properties(upb PROPERTIES LINKER_LANGUAGE C)
# only use the flags for C++ source files
target_compile_options(upb PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>)
endif()
target_link_libraries(upb
${_gRPC_SSL_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
)
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_library(bad_client_test
test/core/bad_client/bad_client.cc
)

@ -1411,7 +1411,7 @@ plugins: $(PROTOC_PLUGINS)
privatelibs: privatelibs_c privatelibs_cxx
privatelibs_c: $(LIBDIR)/$(CONFIG)/libalts_test_util.a $(LIBDIR)/$(CONFIG)/libcxxabi.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libupb.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a
privatelibs_c: $(LIBDIR)/$(CONFIG)/libalts_test_util.a $(LIBDIR)/$(CONFIG)/libcxxabi.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a
pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc
pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc
@ -10117,42 +10117,6 @@ ifneq ($(NO_DEPS),true)
endif
LIBUPB_SRC = \
third_party/upb/google/protobuf/descriptor.upb.c \
third_party/upb/upb/decode.c \
third_party/upb/upb/def.c \
third_party/upb/upb/encode.c \
third_party/upb/upb/handlers.c \
third_party/upb/upb/msg.c \
third_party/upb/upb/msgfactory.c \
third_party/upb/upb/refcounted.c \
third_party/upb/upb/sink.c \
third_party/upb/upb/table.c \
third_party/upb/upb/upb.c \
PUBLIC_HEADERS_C += \
LIBUPB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBUPB_SRC))))
$(LIBUPB_OBJS): CFLAGS += -Ithird_party/upb -Wno-sign-conversion -Wno-shadow -Wno-conversion -Wno-implicit-fallthrough
$(LIBDIR)/$(CONFIG)/libupb.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBUPB_OBJS)
$(E) "[AR] Creating $@"
$(Q) mkdir -p `dirname $@`
$(Q) rm -f $(LIBDIR)/$(CONFIG)/libupb.a
$(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libupb.a $(LIBUPB_OBJS)
ifeq ($(SYSTEM),Darwin)
$(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libupb.a
endif
ifneq ($(NO_DEPS),true)
-include $(LIBUPB_OBJS:.o=.dep)
endif
LIBZ_SRC = \
third_party/zlib/adler32.c \
third_party/zlib/compress.c \

@ -99,7 +99,6 @@ def grpc_cc_library(
linkopts = if_not_windows(["-pthread"]),
includes = [
"include",
"src/core/ext/upb-generated",
],
alwayslink = alwayslink,
data = data,

@ -12,7 +12,7 @@ def grpc_deps():
)
native.bind(
name = "upb_lib",
name = "upblib",
actual = "@upb//:upb",
)
@ -195,8 +195,8 @@ def grpc_deps():
if "upb" not in native.existing_rules():
http_archive(
name = "upb",
strip_prefix = "upb-fb6f7e96895c3a9a8ae2e66516160937e7ac1779",
url = "https://github.com/google/upb/archive/fb6f7e96895c3a9a8ae2e66516160937e7ac1779.tar.gz",
strip_prefix = "upb-9ce4a77f61c134bbed28bfd5be5cd7dc0e80f5e3",
url = "https://github.com/google/upb/archive/9ce4a77f61c134bbed28bfd5be5cd7dc0e80f5e3.tar.gz",
)

@ -5896,8 +5896,6 @@ defaults:
-Wno-deprecated-declarations -Ithird_party/nanopb -DPB_FIELD_32BIT
CXXFLAGS: -Wnon-virtual-dtor
LDFLAGS: -g
upb:
CFLAGS: -Ithird_party/upb -Wno-sign-conversion -Wno-shadow -Wno-conversion -Wno-implicit-fallthrough
zlib:
CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-implicit-function-declaration
-Wno-implicit-fallthrough $(W_NO_SHIFT_NEGATIVE_VALUE) -fvisibility=hidden

@ -2640,25 +2640,6 @@
'third_party/benchmark/src/timers.cc',
],
},
{
'target_name': 'upb',
'type': 'static_library',
'dependencies': [
],
'sources': [
'third_party/upb/google/protobuf/descriptor.upb.c',
'third_party/upb/upb/decode.c',
'third_party/upb/upb/def.c',
'third_party/upb/upb/encode.c',
'third_party/upb/upb/handlers.c',
'third_party/upb/upb/msg.c',
'third_party/upb/upb/msgfactory.c',
'third_party/upb/upb/refcounted.c',
'third_party/upb/upb/sink.c',
'third_party/upb/upb/table.c',
'third_party/upb/upb/upb.c',
],
},
{
'target_name': 'z',
'type': 'static_library',

@ -1,24 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/any.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include "google/protobuf/any.upb.h"
#include <stddef.h>
#include "upb/msg.h"
#include "upb/port_def.inc"
static const upb_msglayout_field google_protobuf_Any__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 12, 1},
};
const upb_msglayout google_protobuf_Any_msginit = {
NULL, &google_protobuf_Any__fields[0], UPB_SIZE(16, 32), 2, false,
};
#include "upb/port_undef.inc"

@ -1,63 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/any.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef GOOGLE_PROTOBUF_ANY_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_ANY_PROTO_UPB_H_
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
UPB_BEGIN_EXTERN_C
struct google_protobuf_Any;
typedef struct google_protobuf_Any google_protobuf_Any;
/* Enums */
/* google.protobuf.Any */
extern const upb_msglayout google_protobuf_Any_msginit;
UPB_INLINE google_protobuf_Any* google_protobuf_Any_new(upb_arena* arena) {
return upb_msg_new(&google_protobuf_Any_msginit, arena);
}
UPB_INLINE google_protobuf_Any* google_protobuf_Any_parsenew(upb_stringview buf,
upb_arena* arena) {
google_protobuf_Any* ret = google_protobuf_Any_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_Any_msginit)) ? ret
: NULL;
}
UPB_INLINE char* google_protobuf_Any_serialize(const google_protobuf_Any* msg,
upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_Any_msginit, arena, len);
}
UPB_INLINE upb_stringview
google_protobuf_Any_type_url(const google_protobuf_Any* msg) {
return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0));
}
UPB_INLINE upb_stringview
google_protobuf_Any_value(const google_protobuf_Any* msg) {
return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16));
}
UPB_INLINE void google_protobuf_Any_set_type_url(google_protobuf_Any* msg,
upb_stringview value) {
UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void google_protobuf_Any_set_value(google_protobuf_Any* msg,
upb_stringview value) {
UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(8, 16)) = value;
}
UPB_END_EXTERN_C
#include "upb/port_undef.inc"
#endif /* GOOGLE_PROTOBUF_ANY_PROTO_UPB_H_ */

@ -1,549 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/descriptor.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include "google/protobuf/descriptor.upb.h"
#include <stddef.h>
#include "upb/msg.h"
#include "upb/port_def.inc"
static const upb_msglayout* const google_protobuf_FileDescriptorSet_submsgs[1] =
{
&google_protobuf_FileDescriptorProto_msginit,
};
static const upb_msglayout_field google_protobuf_FileDescriptorSet__fields[1] =
{
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_FileDescriptorSet_msginit = {
&google_protobuf_FileDescriptorSet_submsgs[0],
&google_protobuf_FileDescriptorSet__fields[0],
UPB_SIZE(4, 8),
1,
false,
};
static const upb_msglayout* const
google_protobuf_FileDescriptorProto_submsgs[6] = {
&google_protobuf_DescriptorProto_msginit,
&google_protobuf_EnumDescriptorProto_msginit,
&google_protobuf_FieldDescriptorProto_msginit,
&google_protobuf_FileOptions_msginit,
&google_protobuf_ServiceDescriptorProto_msginit,
&google_protobuf_SourceCodeInfo_msginit,
};
static const upb_msglayout_field
google_protobuf_FileDescriptorProto__fields[12] = {
{1, UPB_SIZE(8, 16), 1, 0, 9, 1},
{2, UPB_SIZE(16, 32), 2, 0, 9, 1},
{3, UPB_SIZE(40, 80), 0, 0, 9, 3},
{4, UPB_SIZE(44, 88), 0, 0, 11, 3},
{5, UPB_SIZE(48, 96), 0, 1, 11, 3},
{6, UPB_SIZE(52, 104), 0, 4, 11, 3},
{7, UPB_SIZE(56, 112), 0, 2, 11, 3},
{8, UPB_SIZE(32, 64), 4, 3, 11, 1},
{9, UPB_SIZE(36, 72), 5, 5, 11, 1},
{10, UPB_SIZE(60, 120), 0, 0, 5, 3},
{11, UPB_SIZE(64, 128), 0, 0, 5, 3},
{12, UPB_SIZE(24, 48), 3, 0, 9, 1},
};
const upb_msglayout google_protobuf_FileDescriptorProto_msginit = {
&google_protobuf_FileDescriptorProto_submsgs[0],
&google_protobuf_FileDescriptorProto__fields[0],
UPB_SIZE(72, 144),
12,
false,
};
static const upb_msglayout* const google_protobuf_DescriptorProto_submsgs[8] = {
&google_protobuf_DescriptorProto_msginit,
&google_protobuf_DescriptorProto_ExtensionRange_msginit,
&google_protobuf_DescriptorProto_ReservedRange_msginit,
&google_protobuf_EnumDescriptorProto_msginit,
&google_protobuf_FieldDescriptorProto_msginit,
&google_protobuf_MessageOptions_msginit,
&google_protobuf_OneofDescriptorProto_msginit,
};
static const upb_msglayout_field google_protobuf_DescriptorProto__fields[10] = {
{1, UPB_SIZE(8, 16), 1, 0, 9, 1}, {2, UPB_SIZE(20, 40), 0, 4, 11, 3},
{3, UPB_SIZE(24, 48), 0, 0, 11, 3}, {4, UPB_SIZE(28, 56), 0, 3, 11, 3},
{5, UPB_SIZE(32, 64), 0, 1, 11, 3}, {6, UPB_SIZE(36, 72), 0, 4, 11, 3},
{7, UPB_SIZE(16, 32), 2, 5, 11, 1}, {8, UPB_SIZE(40, 80), 0, 6, 11, 3},
{9, UPB_SIZE(44, 88), 0, 2, 11, 3}, {10, UPB_SIZE(48, 96), 0, 0, 9, 3},
};
const upb_msglayout google_protobuf_DescriptorProto_msginit = {
&google_protobuf_DescriptorProto_submsgs[0],
&google_protobuf_DescriptorProto__fields[0],
UPB_SIZE(56, 112),
10,
false,
};
static const upb_msglayout* const
google_protobuf_DescriptorProto_ExtensionRange_submsgs[1] = {
&google_protobuf_ExtensionRangeOptions_msginit,
};
static const upb_msglayout_field
google_protobuf_DescriptorProto_ExtensionRange__fields[3] = {
{1, UPB_SIZE(4, 4), 1, 0, 5, 1},
{2, UPB_SIZE(8, 8), 2, 0, 5, 1},
{3, UPB_SIZE(12, 16), 3, 0, 11, 1},
};
const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit = {
&google_protobuf_DescriptorProto_ExtensionRange_submsgs[0],
&google_protobuf_DescriptorProto_ExtensionRange__fields[0],
UPB_SIZE(16, 24),
3,
false,
};
static const upb_msglayout_field
google_protobuf_DescriptorProto_ReservedRange__fields[2] = {
{1, UPB_SIZE(4, 4), 1, 0, 5, 1},
{2, UPB_SIZE(8, 8), 2, 0, 5, 1},
};
const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit = {
NULL,
&google_protobuf_DescriptorProto_ReservedRange__fields[0],
UPB_SIZE(12, 12),
2,
false,
};
static const upb_msglayout* const
google_protobuf_ExtensionRangeOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field
google_protobuf_ExtensionRangeOptions__fields[1] = {
{999, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit = {
&google_protobuf_ExtensionRangeOptions_submsgs[0],
&google_protobuf_ExtensionRangeOptions__fields[0],
UPB_SIZE(4, 8),
1,
false,
};
static const upb_msglayout* const
google_protobuf_FieldDescriptorProto_submsgs[1] = {
&google_protobuf_FieldOptions_msginit,
};
static const upb_msglayout_field
google_protobuf_FieldDescriptorProto__fields[10] = {
{1, UPB_SIZE(32, 32), 5, 0, 9, 1},
{2, UPB_SIZE(40, 48), 6, 0, 9, 1},
{3, UPB_SIZE(24, 24), 3, 0, 5, 1},
{4, UPB_SIZE(8, 8), 1, 0, 14, 1},
{5, UPB_SIZE(16, 16), 2, 0, 14, 1},
{6, UPB_SIZE(48, 64), 7, 0, 9, 1},
{7, UPB_SIZE(56, 80), 8, 0, 9, 1},
{8, UPB_SIZE(72, 112), 10, 0, 11, 1},
{9, UPB_SIZE(28, 28), 4, 0, 5, 1},
{10, UPB_SIZE(64, 96), 9, 0, 9, 1},
};
const upb_msglayout google_protobuf_FieldDescriptorProto_msginit = {
&google_protobuf_FieldDescriptorProto_submsgs[0],
&google_protobuf_FieldDescriptorProto__fields[0],
UPB_SIZE(80, 128),
10,
false,
};
static const upb_msglayout* const
google_protobuf_OneofDescriptorProto_submsgs[1] = {
&google_protobuf_OneofOptions_msginit,
};
static const upb_msglayout_field
google_protobuf_OneofDescriptorProto__fields[2] = {
{1, UPB_SIZE(8, 16), 1, 0, 9, 1},
{2, UPB_SIZE(16, 32), 2, 0, 11, 1},
};
const upb_msglayout google_protobuf_OneofDescriptorProto_msginit = {
&google_protobuf_OneofDescriptorProto_submsgs[0],
&google_protobuf_OneofDescriptorProto__fields[0],
UPB_SIZE(24, 48),
2,
false,
};
static const upb_msglayout* const
google_protobuf_EnumDescriptorProto_submsgs[3] = {
&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit,
&google_protobuf_EnumOptions_msginit,
&google_protobuf_EnumValueDescriptorProto_msginit,
};
static const upb_msglayout_field
google_protobuf_EnumDescriptorProto__fields[5] = {
{1, UPB_SIZE(8, 16), 1, 0, 9, 1}, {2, UPB_SIZE(20, 40), 0, 2, 11, 3},
{3, UPB_SIZE(16, 32), 2, 1, 11, 1}, {4, UPB_SIZE(24, 48), 0, 0, 11, 3},
{5, UPB_SIZE(28, 56), 0, 0, 9, 3},
};
const upb_msglayout google_protobuf_EnumDescriptorProto_msginit = {
&google_protobuf_EnumDescriptorProto_submsgs[0],
&google_protobuf_EnumDescriptorProto__fields[0],
UPB_SIZE(32, 64),
5,
false,
};
static const upb_msglayout_field
google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[2] = {
{1, UPB_SIZE(4, 4), 1, 0, 5, 1},
{2, UPB_SIZE(8, 8), 2, 0, 5, 1},
};
const upb_msglayout
google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit = {
NULL,
&google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[0],
UPB_SIZE(12, 12),
2,
false,
};
static const upb_msglayout* const
google_protobuf_EnumValueDescriptorProto_submsgs[1] = {
&google_protobuf_EnumValueOptions_msginit,
};
static const upb_msglayout_field
google_protobuf_EnumValueDescriptorProto__fields[3] = {
{1, UPB_SIZE(8, 16), 2, 0, 9, 1},
{2, UPB_SIZE(4, 4), 1, 0, 5, 1},
{3, UPB_SIZE(16, 32), 3, 0, 11, 1},
};
const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit = {
&google_protobuf_EnumValueDescriptorProto_submsgs[0],
&google_protobuf_EnumValueDescriptorProto__fields[0],
UPB_SIZE(24, 48),
3,
false,
};
static const upb_msglayout* const
google_protobuf_ServiceDescriptorProto_submsgs[2] = {
&google_protobuf_MethodDescriptorProto_msginit,
&google_protobuf_ServiceOptions_msginit,
};
static const upb_msglayout_field
google_protobuf_ServiceDescriptorProto__fields[3] = {
{1, UPB_SIZE(8, 16), 1, 0, 9, 1},
{2, UPB_SIZE(20, 40), 0, 0, 11, 3},
{3, UPB_SIZE(16, 32), 2, 1, 11, 1},
};
const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit = {
&google_protobuf_ServiceDescriptorProto_submsgs[0],
&google_protobuf_ServiceDescriptorProto__fields[0],
UPB_SIZE(24, 48),
3,
false,
};
static const upb_msglayout* const
google_protobuf_MethodDescriptorProto_submsgs[1] = {
&google_protobuf_MethodOptions_msginit,
};
static const upb_msglayout_field
google_protobuf_MethodDescriptorProto__fields[6] = {
{1, UPB_SIZE(8, 16), 3, 0, 9, 1}, {2, UPB_SIZE(16, 32), 4, 0, 9, 1},
{3, UPB_SIZE(24, 48), 5, 0, 9, 1}, {4, UPB_SIZE(32, 64), 6, 0, 11, 1},
{5, UPB_SIZE(1, 1), 1, 0, 8, 1}, {6, UPB_SIZE(2, 2), 2, 0, 8, 1},
};
const upb_msglayout google_protobuf_MethodDescriptorProto_msginit = {
&google_protobuf_MethodDescriptorProto_submsgs[0],
&google_protobuf_MethodDescriptorProto__fields[0],
UPB_SIZE(40, 80),
6,
false,
};
static const upb_msglayout* const google_protobuf_FileOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field google_protobuf_FileOptions__fields[21] = {
{1, UPB_SIZE(32, 32), 11, 0, 9, 1},
{8, UPB_SIZE(40, 48), 12, 0, 9, 1},
{9, UPB_SIZE(8, 8), 1, 0, 14, 1},
{10, UPB_SIZE(16, 16), 2, 0, 8, 1},
{11, UPB_SIZE(48, 64), 13, 0, 9, 1},
{16, UPB_SIZE(17, 17), 3, 0, 8, 1},
{17, UPB_SIZE(18, 18), 4, 0, 8, 1},
{18, UPB_SIZE(19, 19), 5, 0, 8, 1},
{20, UPB_SIZE(20, 20), 6, 0, 8, 1},
{23, UPB_SIZE(21, 21), 7, 0, 8, 1},
{27, UPB_SIZE(22, 22), 8, 0, 8, 1},
{31, UPB_SIZE(23, 23), 9, 0, 8, 1},
{36, UPB_SIZE(56, 80), 14, 0, 9, 1},
{37, UPB_SIZE(64, 96), 15, 0, 9, 1},
{39, UPB_SIZE(72, 112), 16, 0, 9, 1},
{40, UPB_SIZE(80, 128), 17, 0, 9, 1},
{41, UPB_SIZE(88, 144), 18, 0, 9, 1},
{42, UPB_SIZE(24, 24), 10, 0, 8, 1},
{44, UPB_SIZE(96, 160), 19, 0, 9, 1},
{45, UPB_SIZE(104, 176), 20, 0, 9, 1},
{999, UPB_SIZE(112, 192), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_FileOptions_msginit = {
&google_protobuf_FileOptions_submsgs[0],
&google_protobuf_FileOptions__fields[0],
UPB_SIZE(120, 208),
21,
false,
};
static const upb_msglayout* const google_protobuf_MessageOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field google_protobuf_MessageOptions__fields[5] = {
{1, UPB_SIZE(1, 1), 1, 0, 8, 1}, {2, UPB_SIZE(2, 2), 2, 0, 8, 1},
{3, UPB_SIZE(3, 3), 3, 0, 8, 1}, {7, UPB_SIZE(4, 4), 4, 0, 8, 1},
{999, UPB_SIZE(8, 8), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_MessageOptions_msginit = {
&google_protobuf_MessageOptions_submsgs[0],
&google_protobuf_MessageOptions__fields[0],
UPB_SIZE(12, 16),
5,
false,
};
static const upb_msglayout* const google_protobuf_FieldOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field google_protobuf_FieldOptions__fields[7] = {
{1, UPB_SIZE(8, 8), 1, 0, 14, 1}, {2, UPB_SIZE(24, 24), 3, 0, 8, 1},
{3, UPB_SIZE(25, 25), 4, 0, 8, 1}, {5, UPB_SIZE(26, 26), 5, 0, 8, 1},
{6, UPB_SIZE(16, 16), 2, 0, 14, 1}, {10, UPB_SIZE(27, 27), 6, 0, 8, 1},
{999, UPB_SIZE(28, 32), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_FieldOptions_msginit = {
&google_protobuf_FieldOptions_submsgs[0],
&google_protobuf_FieldOptions__fields[0],
UPB_SIZE(32, 40),
7,
false,
};
static const upb_msglayout* const google_protobuf_OneofOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field google_protobuf_OneofOptions__fields[1] = {
{999, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_OneofOptions_msginit = {
&google_protobuf_OneofOptions_submsgs[0],
&google_protobuf_OneofOptions__fields[0],
UPB_SIZE(4, 8),
1,
false,
};
static const upb_msglayout* const google_protobuf_EnumOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field google_protobuf_EnumOptions__fields[3] = {
{2, UPB_SIZE(1, 1), 1, 0, 8, 1},
{3, UPB_SIZE(2, 2), 2, 0, 8, 1},
{999, UPB_SIZE(4, 8), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_EnumOptions_msginit = {
&google_protobuf_EnumOptions_submsgs[0],
&google_protobuf_EnumOptions__fields[0],
UPB_SIZE(8, 16),
3,
false,
};
static const upb_msglayout* const google_protobuf_EnumValueOptions_submsgs[1] =
{
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field google_protobuf_EnumValueOptions__fields[2] = {
{1, UPB_SIZE(1, 1), 1, 0, 8, 1},
{999, UPB_SIZE(4, 8), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_EnumValueOptions_msginit = {
&google_protobuf_EnumValueOptions_submsgs[0],
&google_protobuf_EnumValueOptions__fields[0],
UPB_SIZE(8, 16),
2,
false,
};
static const upb_msglayout* const google_protobuf_ServiceOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field google_protobuf_ServiceOptions__fields[2] = {
{33, UPB_SIZE(1, 1), 1, 0, 8, 1},
{999, UPB_SIZE(4, 8), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_ServiceOptions_msginit = {
&google_protobuf_ServiceOptions_submsgs[0],
&google_protobuf_ServiceOptions__fields[0],
UPB_SIZE(8, 16),
2,
false,
};
static const upb_msglayout* const google_protobuf_MethodOptions_submsgs[1] = {
&google_protobuf_UninterpretedOption_msginit,
};
static const upb_msglayout_field google_protobuf_MethodOptions__fields[3] = {
{33, UPB_SIZE(16, 16), 2, 0, 8, 1},
{34, UPB_SIZE(8, 8), 1, 0, 14, 1},
{999, UPB_SIZE(20, 24), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_MethodOptions_msginit = {
&google_protobuf_MethodOptions_submsgs[0],
&google_protobuf_MethodOptions__fields[0],
UPB_SIZE(24, 32),
3,
false,
};
static const upb_msglayout* const
google_protobuf_UninterpretedOption_submsgs[1] = {
&google_protobuf_UninterpretedOption_NamePart_msginit,
};
static const upb_msglayout_field
google_protobuf_UninterpretedOption__fields[7] = {
{2, UPB_SIZE(56, 80), 0, 0, 11, 3}, {3, UPB_SIZE(32, 32), 4, 0, 9, 1},
{4, UPB_SIZE(8, 8), 1, 0, 4, 1}, {5, UPB_SIZE(16, 16), 2, 0, 3, 1},
{6, UPB_SIZE(24, 24), 3, 0, 1, 1}, {7, UPB_SIZE(40, 48), 5, 0, 12, 1},
{8, UPB_SIZE(48, 64), 6, 0, 9, 1},
};
const upb_msglayout google_protobuf_UninterpretedOption_msginit = {
&google_protobuf_UninterpretedOption_submsgs[0],
&google_protobuf_UninterpretedOption__fields[0],
UPB_SIZE(64, 96),
7,
false,
};
static const upb_msglayout_field
google_protobuf_UninterpretedOption_NamePart__fields[2] = {
{1, UPB_SIZE(8, 16), 2, 0, 9, 2},
{2, UPB_SIZE(1, 1), 1, 0, 8, 2},
};
const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit = {
NULL,
&google_protobuf_UninterpretedOption_NamePart__fields[0],
UPB_SIZE(16, 32),
2,
false,
};
static const upb_msglayout* const google_protobuf_SourceCodeInfo_submsgs[1] = {
&google_protobuf_SourceCodeInfo_Location_msginit,
};
static const upb_msglayout_field google_protobuf_SourceCodeInfo__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_SourceCodeInfo_msginit = {
&google_protobuf_SourceCodeInfo_submsgs[0],
&google_protobuf_SourceCodeInfo__fields[0],
UPB_SIZE(4, 8),
1,
false,
};
static const upb_msglayout_field
google_protobuf_SourceCodeInfo_Location__fields[5] = {
{1, UPB_SIZE(24, 48), 0, 0, 5, 3}, {2, UPB_SIZE(28, 56), 0, 0, 5, 3},
{3, UPB_SIZE(8, 16), 1, 0, 9, 1}, {4, UPB_SIZE(16, 32), 2, 0, 9, 1},
{6, UPB_SIZE(32, 64), 0, 0, 9, 3},
};
const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit = {
NULL,
&google_protobuf_SourceCodeInfo_Location__fields[0],
UPB_SIZE(40, 80),
5,
false,
};
static const upb_msglayout* const google_protobuf_GeneratedCodeInfo_submsgs[1] =
{
&google_protobuf_GeneratedCodeInfo_Annotation_msginit,
};
static const upb_msglayout_field google_protobuf_GeneratedCodeInfo__fields[1] =
{
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit = {
&google_protobuf_GeneratedCodeInfo_submsgs[0],
&google_protobuf_GeneratedCodeInfo__fields[0],
UPB_SIZE(4, 8),
1,
false,
};
static const upb_msglayout_field
google_protobuf_GeneratedCodeInfo_Annotation__fields[4] = {
{1, UPB_SIZE(24, 32), 0, 0, 5, 3},
{2, UPB_SIZE(16, 16), 3, 0, 9, 1},
{3, UPB_SIZE(4, 4), 1, 0, 5, 1},
{4, UPB_SIZE(8, 8), 2, 0, 5, 1},
};
const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit = {
NULL,
&google_protobuf_GeneratedCodeInfo_Annotation__fields[0],
UPB_SIZE(32, 48),
4,
false,
};
#include "upb/port_undef.inc"

File diff suppressed because it is too large Load Diff

@ -1,24 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/duration.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include "google/protobuf/duration.upb.h"
#include <stddef.h>
#include "upb/msg.h"
#include "upb/port_def.inc"
static const upb_msglayout_field google_protobuf_Duration__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 3, 1},
{2, UPB_SIZE(8, 8), 0, 0, 5, 1},
};
const upb_msglayout google_protobuf_Duration_msginit = {
NULL, &google_protobuf_Duration__fields[0], UPB_SIZE(16, 16), 2, false,
};
#include "upb/port_undef.inc"

@ -1,65 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/duration.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef GOOGLE_PROTOBUF_DURATION_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_DURATION_PROTO_UPB_H_
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
UPB_BEGIN_EXTERN_C
struct google_protobuf_Duration;
typedef struct google_protobuf_Duration google_protobuf_Duration;
/* Enums */
/* google.protobuf.Duration */
extern const upb_msglayout google_protobuf_Duration_msginit;
UPB_INLINE google_protobuf_Duration* google_protobuf_Duration_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_Duration_msginit, arena);
}
UPB_INLINE google_protobuf_Duration* google_protobuf_Duration_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_Duration* ret = google_protobuf_Duration_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_Duration_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_Duration_serialize(
const google_protobuf_Duration* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_Duration_msginit, arena, len);
}
UPB_INLINE int64_t
google_protobuf_Duration_seconds(const google_protobuf_Duration* msg) {
return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0));
}
UPB_INLINE int32_t
google_protobuf_Duration_nanos(const google_protobuf_Duration* msg) {
return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8));
}
UPB_INLINE void google_protobuf_Duration_set_seconds(
google_protobuf_Duration* msg, int64_t value) {
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void google_protobuf_Duration_set_nanos(
google_protobuf_Duration* msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
}
UPB_END_EXTERN_C
#include "upb/port_undef.inc"
#endif /* GOOGLE_PROTOBUF_DURATION_PROTO_UPB_H_ */

@ -1,88 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/struct.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include "google/protobuf/struct.upb.h"
#include <stddef.h>
#include "upb/msg.h"
#include "upb/port_def.inc"
static const upb_msglayout* const google_protobuf_Struct_submsgs[1] = {
&google_protobuf_Struct_FieldsEntry_msginit,
};
static const upb_msglayout_field google_protobuf_Struct__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_Struct_msginit = {
&google_protobuf_Struct_submsgs[0],
&google_protobuf_Struct__fields[0],
UPB_SIZE(4, 8),
1,
false,
};
static const upb_msglayout* const
google_protobuf_Struct_FieldsEntry_submsgs[1] = {
&google_protobuf_Value_msginit,
};
static const upb_msglayout_field google_protobuf_Struct_FieldsEntry__fields[2] =
{
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout google_protobuf_Struct_FieldsEntry_msginit = {
&google_protobuf_Struct_FieldsEntry_submsgs[0],
&google_protobuf_Struct_FieldsEntry__fields[0],
UPB_SIZE(16, 32),
2,
false,
};
static const upb_msglayout* const google_protobuf_Value_submsgs[2] = {
&google_protobuf_ListValue_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field google_protobuf_Value__fields[6] = {
{1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 14, 1},
{2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 1, 1},
{3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
{4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 8, 1},
{5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 1, 11, 1},
{6, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1},
};
const upb_msglayout google_protobuf_Value_msginit = {
&google_protobuf_Value_submsgs[0],
&google_protobuf_Value__fields[0],
UPB_SIZE(16, 32),
6,
false,
};
static const upb_msglayout* const google_protobuf_ListValue_submsgs[1] = {
&google_protobuf_Value_msginit,
};
static const upb_msglayout_field google_protobuf_ListValue__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_ListValue_msginit = {
&google_protobuf_ListValue_submsgs[0],
&google_protobuf_ListValue__fields[0],
UPB_SIZE(4, 8),
1,
false,
};
#include "upb/port_undef.inc"

@ -1,226 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/struct.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
UPB_BEGIN_EXTERN_C
struct google_protobuf_Struct;
struct google_protobuf_Struct_FieldsEntry;
struct google_protobuf_Value;
struct google_protobuf_ListValue;
typedef struct google_protobuf_Struct google_protobuf_Struct;
typedef struct google_protobuf_Struct_FieldsEntry
google_protobuf_Struct_FieldsEntry;
typedef struct google_protobuf_Value google_protobuf_Value;
typedef struct google_protobuf_ListValue google_protobuf_ListValue;
/* Enums */
typedef enum { google_protobuf_NULL_VALUE = 0 } google_protobuf_NullValue;
/* google.protobuf.Struct */
extern const upb_msglayout google_protobuf_Struct_msginit;
UPB_INLINE google_protobuf_Struct* google_protobuf_Struct_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_Struct_msginit, arena);
}
UPB_INLINE google_protobuf_Struct* google_protobuf_Struct_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_Struct* ret = google_protobuf_Struct_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_Struct_msginit)) ? ret
: NULL;
}
UPB_INLINE char* google_protobuf_Struct_serialize(
const google_protobuf_Struct* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_Struct_msginit, arena, len);
}
UPB_INLINE const upb_array* google_protobuf_Struct_fields(
const google_protobuf_Struct* msg) {
return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_Struct_set_fields(google_protobuf_Struct* msg,
upb_array* value) {
UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.Struct.FieldsEntry */
extern const upb_msglayout google_protobuf_Struct_FieldsEntry_msginit;
UPB_INLINE google_protobuf_Struct_FieldsEntry*
google_protobuf_Struct_FieldsEntry_new(upb_arena* arena) {
return upb_msg_new(&google_protobuf_Struct_FieldsEntry_msginit, arena);
}
UPB_INLINE google_protobuf_Struct_FieldsEntry*
google_protobuf_Struct_FieldsEntry_parsenew(upb_stringview buf,
upb_arena* arena) {
google_protobuf_Struct_FieldsEntry* ret =
google_protobuf_Struct_FieldsEntry_new(arena);
return (ret &&
upb_decode(buf, ret, &google_protobuf_Struct_FieldsEntry_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_Struct_FieldsEntry_serialize(
const google_protobuf_Struct_FieldsEntry* msg, upb_arena* arena,
size_t* len) {
return upb_encode(msg, &google_protobuf_Struct_FieldsEntry_msginit, arena,
len);
}
UPB_INLINE upb_stringview google_protobuf_Struct_FieldsEntry_key(
const google_protobuf_Struct_FieldsEntry* msg) {
return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0));
}
UPB_INLINE const google_protobuf_Value*
google_protobuf_Struct_FieldsEntry_value(
const google_protobuf_Struct_FieldsEntry* msg) {
return UPB_FIELD_AT(msg, const google_protobuf_Value*, UPB_SIZE(8, 16));
}
UPB_INLINE void google_protobuf_Struct_FieldsEntry_set_key(
google_protobuf_Struct_FieldsEntry* msg, upb_stringview value) {
UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void google_protobuf_Struct_FieldsEntry_set_value(
google_protobuf_Struct_FieldsEntry* msg, google_protobuf_Value* value) {
UPB_FIELD_AT(msg, google_protobuf_Value*, UPB_SIZE(8, 16)) = value;
}
/* google.protobuf.Value */
extern const upb_msglayout google_protobuf_Value_msginit;
UPB_INLINE google_protobuf_Value* google_protobuf_Value_new(upb_arena* arena) {
return upb_msg_new(&google_protobuf_Value_msginit, arena);
}
UPB_INLINE google_protobuf_Value* google_protobuf_Value_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_Value* ret = google_protobuf_Value_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_Value_msginit)) ? ret
: NULL;
}
UPB_INLINE char* google_protobuf_Value_serialize(
const google_protobuf_Value* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_Value_msginit, arena, len);
}
typedef enum {
google_protobuf_Value_kind_null_value = 1,
google_protobuf_Value_kind_number_value = 2,
google_protobuf_Value_kind_string_value = 3,
google_protobuf_Value_kind_bool_value = 4,
google_protobuf_Value_kind_struct_value = 5,
google_protobuf_Value_kind_list_value = 6,
google_protobuf_Value_kind_NOT_SET = 0,
} google_protobuf_Value_kind_oneofcases;
UPB_INLINE google_protobuf_Value_kind_oneofcases
google_protobuf_Value_kind_case(const google_protobuf_Value* msg) {
return UPB_FIELD_AT(msg, int, UPB_SIZE(8, 16));
}
UPB_INLINE google_protobuf_NullValue
google_protobuf_Value_null_value(const google_protobuf_Value* msg) {
return UPB_READ_ONEOF(msg, google_protobuf_NullValue, UPB_SIZE(0, 0),
UPB_SIZE(8, 16), 1, google_protobuf_NULL_VALUE);
}
UPB_INLINE double google_protobuf_Value_number_value(
const google_protobuf_Value* msg) {
return UPB_READ_ONEOF(msg, double, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, 0);
}
UPB_INLINE upb_stringview
google_protobuf_Value_string_value(const google_protobuf_Value* msg) {
return UPB_READ_ONEOF(msg, upb_stringview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3,
upb_stringview_make("", strlen("")));
}
UPB_INLINE bool google_protobuf_Value_bool_value(
const google_protobuf_Value* msg) {
return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 4, false);
}
UPB_INLINE const google_protobuf_Struct* google_protobuf_Value_struct_value(
const google_protobuf_Value* msg) {
return UPB_READ_ONEOF(msg, const google_protobuf_Struct*, UPB_SIZE(0, 0),
UPB_SIZE(8, 16), 5, NULL);
}
UPB_INLINE const google_protobuf_ListValue* google_protobuf_Value_list_value(
const google_protobuf_Value* msg) {
return UPB_READ_ONEOF(msg, const google_protobuf_ListValue*, UPB_SIZE(0, 0),
UPB_SIZE(8, 16), 6, NULL);
}
UPB_INLINE void google_protobuf_Value_set_null_value(
google_protobuf_Value* msg, google_protobuf_NullValue value) {
UPB_WRITE_ONEOF(msg, google_protobuf_NullValue, UPB_SIZE(0, 0), value,
UPB_SIZE(8, 16), 1);
}
UPB_INLINE void google_protobuf_Value_set_number_value(
google_protobuf_Value* msg, double value) {
UPB_WRITE_ONEOF(msg, double, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2);
}
UPB_INLINE void google_protobuf_Value_set_string_value(
google_protobuf_Value* msg, upb_stringview value) {
UPB_WRITE_ONEOF(msg, upb_stringview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16),
3);
}
UPB_INLINE void google_protobuf_Value_set_bool_value(google_protobuf_Value* msg,
bool value) {
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 4);
}
UPB_INLINE void google_protobuf_Value_set_struct_value(
google_protobuf_Value* msg, google_protobuf_Struct* value) {
UPB_WRITE_ONEOF(msg, google_protobuf_Struct*, UPB_SIZE(0, 0), value,
UPB_SIZE(8, 16), 5);
}
UPB_INLINE void google_protobuf_Value_set_list_value(
google_protobuf_Value* msg, google_protobuf_ListValue* value) {
UPB_WRITE_ONEOF(msg, google_protobuf_ListValue*, UPB_SIZE(0, 0), value,
UPB_SIZE(8, 16), 6);
}
/* google.protobuf.ListValue */
extern const upb_msglayout google_protobuf_ListValue_msginit;
UPB_INLINE google_protobuf_ListValue* google_protobuf_ListValue_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_ListValue_msginit, arena);
}
UPB_INLINE google_protobuf_ListValue* google_protobuf_ListValue_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_ListValue* ret = google_protobuf_ListValue_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_ListValue_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_ListValue_serialize(
const google_protobuf_ListValue* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_ListValue_msginit, arena, len);
}
UPB_INLINE const upb_array* google_protobuf_ListValue_values(
const google_protobuf_ListValue* msg) {
return UPB_FIELD_AT(msg, const upb_array*, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_ListValue_set_values(
google_protobuf_ListValue* msg, upb_array* value) {
UPB_FIELD_AT(msg, upb_array*, UPB_SIZE(0, 0)) = value;
}
UPB_END_EXTERN_C
#include "upb/port_undef.inc"
#endif /* GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_ */

@ -1,24 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/timestamp.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include "google/protobuf/timestamp.upb.h"
#include <stddef.h>
#include "upb/msg.h"
#include "upb/port_def.inc"
static const upb_msglayout_field google_protobuf_Timestamp__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 3, 1},
{2, UPB_SIZE(8, 8), 0, 0, 5, 1},
};
const upb_msglayout google_protobuf_Timestamp_msginit = {
NULL, &google_protobuf_Timestamp__fields[0], UPB_SIZE(16, 16), 2, false,
};
#include "upb/port_undef.inc"

@ -1,65 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/timestamp.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
UPB_BEGIN_EXTERN_C
struct google_protobuf_Timestamp;
typedef struct google_protobuf_Timestamp google_protobuf_Timestamp;
/* Enums */
/* google.protobuf.Timestamp */
extern const upb_msglayout google_protobuf_Timestamp_msginit;
UPB_INLINE google_protobuf_Timestamp* google_protobuf_Timestamp_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
}
UPB_INLINE google_protobuf_Timestamp* google_protobuf_Timestamp_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_Timestamp* ret = google_protobuf_Timestamp_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_Timestamp_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_Timestamp_serialize(
const google_protobuf_Timestamp* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_Timestamp_msginit, arena, len);
}
UPB_INLINE int64_t
google_protobuf_Timestamp_seconds(const google_protobuf_Timestamp* msg) {
return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0));
}
UPB_INLINE int32_t
google_protobuf_Timestamp_nanos(const google_protobuf_Timestamp* msg) {
return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8));
}
UPB_INLINE void google_protobuf_Timestamp_set_seconds(
google_protobuf_Timestamp* msg, int64_t value) {
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void google_protobuf_Timestamp_set_nanos(
google_protobuf_Timestamp* msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
}
UPB_END_EXTERN_C
#include "upb/port_undef.inc"
#endif /* GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_ */

@ -1,87 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/wrappers.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include "google/protobuf/wrappers.upb.h"
#include <stddef.h>
#include "upb/msg.h"
#include "upb/port_def.inc"
static const upb_msglayout_field google_protobuf_DoubleValue__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 1, 1},
};
const upb_msglayout google_protobuf_DoubleValue_msginit = {
NULL, &google_protobuf_DoubleValue__fields[0], UPB_SIZE(8, 8), 1, false,
};
static const upb_msglayout_field google_protobuf_FloatValue__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 2, 1},
};
const upb_msglayout google_protobuf_FloatValue_msginit = {
NULL, &google_protobuf_FloatValue__fields[0], UPB_SIZE(4, 4), 1, false,
};
static const upb_msglayout_field google_protobuf_Int64Value__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 3, 1},
};
const upb_msglayout google_protobuf_Int64Value_msginit = {
NULL, &google_protobuf_Int64Value__fields[0], UPB_SIZE(8, 8), 1, false,
};
static const upb_msglayout_field google_protobuf_UInt64Value__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 4, 1},
};
const upb_msglayout google_protobuf_UInt64Value_msginit = {
NULL, &google_protobuf_UInt64Value__fields[0], UPB_SIZE(8, 8), 1, false,
};
static const upb_msglayout_field google_protobuf_Int32Value__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 5, 1},
};
const upb_msglayout google_protobuf_Int32Value_msginit = {
NULL, &google_protobuf_Int32Value__fields[0], UPB_SIZE(4, 4), 1, false,
};
static const upb_msglayout_field google_protobuf_UInt32Value__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 13, 1},
};
const upb_msglayout google_protobuf_UInt32Value_msginit = {
NULL, &google_protobuf_UInt32Value__fields[0], UPB_SIZE(4, 4), 1, false,
};
static const upb_msglayout_field google_protobuf_BoolValue__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout google_protobuf_BoolValue_msginit = {
NULL, &google_protobuf_BoolValue__fields[0], UPB_SIZE(1, 1), 1, false,
};
static const upb_msglayout_field google_protobuf_StringValue__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
const upb_msglayout google_protobuf_StringValue_msginit = {
NULL, &google_protobuf_StringValue__fields[0], UPB_SIZE(8, 16), 1, false,
};
static const upb_msglayout_field google_protobuf_BytesValue__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 12, 1},
};
const upb_msglayout google_protobuf_BytesValue_msginit = {
NULL, &google_protobuf_BytesValue__fields[0], UPB_SIZE(8, 16), 1, false,
};
#include "upb/port_undef.inc"

@ -1,305 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* google/protobuf/wrappers.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
UPB_BEGIN_EXTERN_C
struct google_protobuf_DoubleValue;
struct google_protobuf_FloatValue;
struct google_protobuf_Int64Value;
struct google_protobuf_UInt64Value;
struct google_protobuf_Int32Value;
struct google_protobuf_UInt32Value;
struct google_protobuf_BoolValue;
struct google_protobuf_StringValue;
struct google_protobuf_BytesValue;
typedef struct google_protobuf_DoubleValue google_protobuf_DoubleValue;
typedef struct google_protobuf_FloatValue google_protobuf_FloatValue;
typedef struct google_protobuf_Int64Value google_protobuf_Int64Value;
typedef struct google_protobuf_UInt64Value google_protobuf_UInt64Value;
typedef struct google_protobuf_Int32Value google_protobuf_Int32Value;
typedef struct google_protobuf_UInt32Value google_protobuf_UInt32Value;
typedef struct google_protobuf_BoolValue google_protobuf_BoolValue;
typedef struct google_protobuf_StringValue google_protobuf_StringValue;
typedef struct google_protobuf_BytesValue google_protobuf_BytesValue;
/* Enums */
/* google.protobuf.DoubleValue */
extern const upb_msglayout google_protobuf_DoubleValue_msginit;
UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_DoubleValue_msginit, arena);
}
UPB_INLINE google_protobuf_DoubleValue* google_protobuf_DoubleValue_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_DoubleValue* ret = google_protobuf_DoubleValue_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_DoubleValue_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_DoubleValue_serialize(
const google_protobuf_DoubleValue* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_DoubleValue_msginit, arena, len);
}
UPB_INLINE double google_protobuf_DoubleValue_value(
const google_protobuf_DoubleValue* msg) {
return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_DoubleValue_set_value(
google_protobuf_DoubleValue* msg, double value) {
UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.FloatValue */
extern const upb_msglayout google_protobuf_FloatValue_msginit;
UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_FloatValue_msginit, arena);
}
UPB_INLINE google_protobuf_FloatValue* google_protobuf_FloatValue_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_FloatValue* ret = google_protobuf_FloatValue_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_FloatValue_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_FloatValue_serialize(
const google_protobuf_FloatValue* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_FloatValue_msginit, arena, len);
}
UPB_INLINE float google_protobuf_FloatValue_value(
const google_protobuf_FloatValue* msg) {
return UPB_FIELD_AT(msg, float, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_FloatValue_set_value(
google_protobuf_FloatValue* msg, float value) {
UPB_FIELD_AT(msg, float, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.Int64Value */
extern const upb_msglayout google_protobuf_Int64Value_msginit;
UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_Int64Value_msginit, arena);
}
UPB_INLINE google_protobuf_Int64Value* google_protobuf_Int64Value_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_Int64Value* ret = google_protobuf_Int64Value_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_Int64Value_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_Int64Value_serialize(
const google_protobuf_Int64Value* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_Int64Value_msginit, arena, len);
}
UPB_INLINE int64_t
google_protobuf_Int64Value_value(const google_protobuf_Int64Value* msg) {
return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_Int64Value_set_value(
google_protobuf_Int64Value* msg, int64_t value) {
UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.UInt64Value */
extern const upb_msglayout google_protobuf_UInt64Value_msginit;
UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_UInt64Value_msginit, arena);
}
UPB_INLINE google_protobuf_UInt64Value* google_protobuf_UInt64Value_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_UInt64Value* ret = google_protobuf_UInt64Value_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_UInt64Value_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_UInt64Value_serialize(
const google_protobuf_UInt64Value* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_UInt64Value_msginit, arena, len);
}
UPB_INLINE uint64_t
google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value* msg) {
return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_UInt64Value_set_value(
google_protobuf_UInt64Value* msg, uint64_t value) {
UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.Int32Value */
extern const upb_msglayout google_protobuf_Int32Value_msginit;
UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_Int32Value_msginit, arena);
}
UPB_INLINE google_protobuf_Int32Value* google_protobuf_Int32Value_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_Int32Value* ret = google_protobuf_Int32Value_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_Int32Value_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_Int32Value_serialize(
const google_protobuf_Int32Value* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_Int32Value_msginit, arena, len);
}
UPB_INLINE int32_t
google_protobuf_Int32Value_value(const google_protobuf_Int32Value* msg) {
return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_Int32Value_set_value(
google_protobuf_Int32Value* msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.UInt32Value */
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
}
UPB_INLINE google_protobuf_UInt32Value* google_protobuf_UInt32Value_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_UInt32Value* ret = google_protobuf_UInt32Value_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_UInt32Value_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_UInt32Value_serialize(
const google_protobuf_UInt32Value* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_UInt32Value_msginit, arena, len);
}
UPB_INLINE uint32_t
google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value* msg) {
return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_UInt32Value_set_value(
google_protobuf_UInt32Value* msg, uint32_t value) {
UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.BoolValue */
extern const upb_msglayout google_protobuf_BoolValue_msginit;
UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
}
UPB_INLINE google_protobuf_BoolValue* google_protobuf_BoolValue_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_BoolValue* ret = google_protobuf_BoolValue_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_BoolValue_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_BoolValue_serialize(
const google_protobuf_BoolValue* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_BoolValue_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_BoolValue_value(
const google_protobuf_BoolValue* msg) {
return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_BoolValue_set_value(
google_protobuf_BoolValue* msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.StringValue */
extern const upb_msglayout google_protobuf_StringValue_msginit;
UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_StringValue_msginit, arena);
}
UPB_INLINE google_protobuf_StringValue* google_protobuf_StringValue_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_StringValue* ret = google_protobuf_StringValue_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_StringValue_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_StringValue_serialize(
const google_protobuf_StringValue* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_StringValue_msginit, arena, len);
}
UPB_INLINE upb_stringview
google_protobuf_StringValue_value(const google_protobuf_StringValue* msg) {
return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_StringValue_set_value(
google_protobuf_StringValue* msg, upb_stringview value) {
UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)) = value;
}
/* google.protobuf.BytesValue */
extern const upb_msglayout google_protobuf_BytesValue_msginit;
UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_new(
upb_arena* arena) {
return upb_msg_new(&google_protobuf_BytesValue_msginit, arena);
}
UPB_INLINE google_protobuf_BytesValue* google_protobuf_BytesValue_parsenew(
upb_stringview buf, upb_arena* arena) {
google_protobuf_BytesValue* ret = google_protobuf_BytesValue_new(arena);
return (ret && upb_decode(buf, ret, &google_protobuf_BytesValue_msginit))
? ret
: NULL;
}
UPB_INLINE char* google_protobuf_BytesValue_serialize(
const google_protobuf_BytesValue* msg, upb_arena* arena, size_t* len) {
return upb_encode(msg, &google_protobuf_BytesValue_msginit, arena, len);
}
UPB_INLINE upb_stringview
google_protobuf_BytesValue_value(const google_protobuf_BytesValue* msg) {
return UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0));
}
UPB_INLINE void google_protobuf_BytesValue_set_value(
google_protobuf_BytesValue* msg, upb_stringview value) {
UPB_FIELD_AT(msg, upb_stringview, UPB_SIZE(0, 0)) = value;
}
UPB_END_EXTERN_C
#include "upb/port_undef.inc"
#endif /* GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ */

@ -1,69 +0,0 @@
#!/usr/bin/env python2.7
# Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: This should ideally be in upb submodule to avoid hardcoding this here.
import re
import os
import sys
import yaml
srcs = [
"third_party/upb/google/protobuf/descriptor.upb.c",
"third_party/upb/upb/decode.c",
"third_party/upb/upb/def.c",
"third_party/upb/upb/encode.c",
"third_party/upb/upb/handlers.c",
"third_party/upb/upb/msg.c",
"third_party/upb/upb/msgfactory.c",
"third_party/upb/upb/refcounted.c",
"third_party/upb/upb/sink.c",
"third_party/upb/upb/table.c",
"third_party/upb/upb/upb.c",
]
hdrs = [
"third_party/upb/google/protobuf/descriptor.upb.h",
"third_party/upb/upb/decode.h",
"third_party/upb/upb/def.h",
"third_party/upb/upb/encode.h",
"third_party/upb/upb/handlers.h",
"third_party/upb/upb/msg.h",
"third_party/upb/upb/msgfactory.h",
"third_party/upb/upb/refcounted.h",
"third_party/upb/upb/sink.h",
"third_party/upb/upb/upb.h",
]
os.chdir(os.path.dirname(sys.argv[0])+'/../..')
out = {}
try:
out['libs'] = [{
'name': 'upb',
'defaults': 'upb',
'build': 'private',
'language': 'c',
'secure': 'no',
'src': srcs,
'headers': hdrs,
}]
except:
pass
print yaml.dump(out)

@ -19,7 +19,6 @@ gen_build_yaml_dirs=" \
src/boringssl \
src/benchmark \
src/proto \
src/upb \
src/zlib \
src/c-ares \
test/core/bad_client \

@ -1,38 +0,0 @@
#!/bin/bash
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# REQUIRES: Bazel
set -ex
rm -rf src/core/ext/upb-generated
mkdir src/core/ext/upb-generated
cd third_party
cd upb
bazel build :protoc-gen-upb
cd ../..
proto_files=( \
"google/protobuf/any.proto" \
"google/protobuf/struct.proto" \
"google/protobuf/wrappers.proto" \
"google/protobuf/descriptor.proto" \
"google/protobuf/duration.proto" \
"google/protobuf/timestamp.proto" )
for i in "${proto_files[@]}"
do
protoc -I=$PWD/third_party/data-plane-api -I=$PWD/third_party/googleapis -I=$PWD/third_party/protobuf -I=$PWD/third_party/protoc-gen-validate $i --upb_out=./src/core/ext/upb-generated --plugin=protoc-gen-upb=third_party/upb/bazel-bin/protoc-gen-upb
done

@ -104,20 +104,6 @@ _EXEMPT = frozenset((
# Designer-generated source
'examples/csharp/HelloworldXamarin/Droid/Resources/Resource.designer.cs',
'examples/csharp/HelloworldXamarin/iOS/ViewController.designer.cs',
# Upb generated source
'src/core/ext/upb-generated/google/protobuf/any.upb.h',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.h',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.h',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
))
RE_YEAR = r'Copyright (?P<first_year>[0-9]+\-)?(?P<last_year>[0-9]+) ([Tt]he )?gRPC [Aa]uthors(\.|)'

@ -165,20 +165,6 @@ KNOWN_BAD = set([
'src/core/tsi/alts/handshaker/transport_security_common.pb.h',
'include/grpc++/ext/reflection.grpc.pb.h',
'include/grpc++/ext/reflection.pb.h',
# Upb generated code
'src/core/ext/upb-generated/google/protobuf/any.upb.h',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.h',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.h',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
])
grep_filter = r"grep -E '^(include|src/core)/.*\.h$'"

@ -8831,27 +8831,6 @@
"third_party": false,
"type": "lib"
},
{
"deps": [],
"headers": [
"third_party/upb/google/protobuf/descriptor.upb.h",
"third_party/upb/upb/decode.h",
"third_party/upb/upb/def.h",
"third_party/upb/upb/encode.h",
"third_party/upb/upb/handlers.h",
"third_party/upb/upb/msg.h",
"third_party/upb/upb/msgfactory.h",
"third_party/upb/upb/refcounted.h",
"third_party/upb/upb/sink.h",
"third_party/upb/upb/upb.h"
],
"is_filegroup": false,
"language": "c",
"name": "upb",
"src": [],
"third_party": false,
"type": "lib"
},
{
"deps": [],
"headers": [

@ -35,9 +35,6 @@ def check_port_platform_inclusion(directory_root):
continue
if filename.endswith('.pb.h') or filename.endswith('.pb.c'):
continue
# Skip check for upb generated code
if filename.endswith('.upb.h') or filename.endswith('.upb.c'):
continue
with open(path) as f:
all_lines_in_file = f.readlines()
for index, l in enumerate(all_lines_in_file):

Loading…
Cancel
Save