Auto-generate files after cl/966337187
diff --git a/php/ext/google/protobuf/php-upb.c b/php/ext/google/protobuf/php-upb.c index 65ed6d6..4024303 100644 --- a/php/ext/google/protobuf/php-upb.c +++ b/php/ext/google/protobuf/php-upb.c
@@ -495,7 +495,7 @@ /* aarch64 supports big and little endian modes; fasttable performs multibyte * tag loads assumes the tag of a varint is in the low bits. */ -#if !defined(_WIN32) && (defined(__x86_64__) || defined(__AARCH64EL__)) && \ +#if (defined(__x86_64__) || defined(__AARCH64EL__)) && \ UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail) #define UPB_FASTTABLE_SUPPORTED 1 #else @@ -514,11 +514,7 @@ * This is useful for releasing code that might be used on multiple platforms, * for example the PHP or Ruby C extensions. */ #elif defined(UPB_TRY_ENABLE_FASTTABLE) -#if UPB_FASTTABLE_SUPPORTED -#define UPB_FASTTABLE 1 -#else -#define UPB_FASTTABLE 0 -#endif +#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED #else #define UPB_FASTTABLE 0 #endif @@ -572,12 +568,6 @@ #define UPB_RETAIN #endif -#if defined(__GNUC__) || defined(__clang__) -#define UPB_HIDDEN __attribute__((visibility("hidden"))) -#else -#define UPB_HIDDEN -#endif - // Linker arrays combine elements from multiple translation units into a single // array that can be iterated over at runtime. // @@ -631,7 +621,7 @@ #elif defined(__MACH__) - /* As described in: https://stackoverflow.com/a/22366882 */ +/* As described in: https://stackoverflow.com/a/22366882 */ #define UPB_LINKARR_APPEND(name) \ __attribute__(( \ section("__DATA,__la_" #name))) UPB_LINKARR_ATTR UPB_NO_SANITIZE_ADDRESS @@ -650,10 +640,10 @@ #elif defined(_MSC_VER) - /* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ +/* See: + * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 + * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 + * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ #define UPB_STRINGIFY_INTERNAL(x) #x #define UPB_STRINGIFY(x) UPB_STRINGIFY_INTERNAL(x) #define UPB_CONCAT(a, b, c) a##b##c @@ -662,7 +652,7 @@ #define UPB_LINKARR_APPEND(name) \ __pragma(section(UPB_LINKARR_NAME(name, $j), read)) \ __declspec(allocate(UPB_LINKARR_NAME(name, $j))) - // clang-format off +// clang-format off #define UPB_LINKARR_DECLARE(name, type) \ __pragma(message(UPB_LINKARR_NAME(name, $j))) \ __pragma(section(UPB_LINKARR_NAME(name, $a), read)) \ @@ -673,13 +663,13 @@ type __stop_linkarr_##name; \ UPB_LINKARR_APPEND(name) \ __declspec(selectany) type UPB_linkarr_internal_empty_##name[1] = {0} - // clang-format on +// clang-format on #define UPB_LINKARR_START(name) (&__start_linkarr_##name) #define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) #else - // Linker arrays are not supported on this platform. Make macros no-ops. +// Linker arrays are not supported on this platform. Make macros no-ops. #define UPB_LINKARR_APPEND(name) #define UPB_LINKARR_DECLARE(name, type) \ UPB_STATIC_ASSERT(sizeof("__la_" #name) <= 17, \ @@ -19654,5 +19644,3 @@ #undef _UPB_STRINGIFY #undef _UPB_STRINGIFY2 #undef UPB_CONSTRUCTOR -#undef UPB_RETAIN -#undef UPB_HIDDEN
diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index 7416ef4..b96d839 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h
@@ -494,7 +494,7 @@ /* aarch64 supports big and little endian modes; fasttable performs multibyte * tag loads assumes the tag of a varint is in the low bits. */ -#if !defined(_WIN32) && (defined(__x86_64__) || defined(__AARCH64EL__)) && \ +#if (defined(__x86_64__) || defined(__AARCH64EL__)) && \ UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail) #define UPB_FASTTABLE_SUPPORTED 1 #else @@ -513,11 +513,7 @@ * This is useful for releasing code that might be used on multiple platforms, * for example the PHP or Ruby C extensions. */ #elif defined(UPB_TRY_ENABLE_FASTTABLE) -#if UPB_FASTTABLE_SUPPORTED -#define UPB_FASTTABLE 1 -#else -#define UPB_FASTTABLE 0 -#endif +#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED #else #define UPB_FASTTABLE 0 #endif @@ -571,12 +567,6 @@ #define UPB_RETAIN #endif -#if defined(__GNUC__) || defined(__clang__) -#define UPB_HIDDEN __attribute__((visibility("hidden"))) -#else -#define UPB_HIDDEN -#endif - // Linker arrays combine elements from multiple translation units into a single // array that can be iterated over at runtime. // @@ -630,7 +620,7 @@ #elif defined(__MACH__) - /* As described in: https://stackoverflow.com/a/22366882 */ +/* As described in: https://stackoverflow.com/a/22366882 */ #define UPB_LINKARR_APPEND(name) \ __attribute__(( \ section("__DATA,__la_" #name))) UPB_LINKARR_ATTR UPB_NO_SANITIZE_ADDRESS @@ -649,10 +639,10 @@ #elif defined(_MSC_VER) - /* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ +/* See: + * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 + * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 + * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ #define UPB_STRINGIFY_INTERNAL(x) #x #define UPB_STRINGIFY(x) UPB_STRINGIFY_INTERNAL(x) #define UPB_CONCAT(a, b, c) a##b##c @@ -661,7 +651,7 @@ #define UPB_LINKARR_APPEND(name) \ __pragma(section(UPB_LINKARR_NAME(name, $j), read)) \ __declspec(allocate(UPB_LINKARR_NAME(name, $j))) - // clang-format off +// clang-format off #define UPB_LINKARR_DECLARE(name, type) \ __pragma(message(UPB_LINKARR_NAME(name, $j))) \ __pragma(section(UPB_LINKARR_NAME(name, $a), read)) \ @@ -672,13 +662,13 @@ type __stop_linkarr_##name; \ UPB_LINKARR_APPEND(name) \ __declspec(selectany) type UPB_linkarr_internal_empty_##name[1] = {0} - // clang-format on +// clang-format on #define UPB_LINKARR_START(name) (&__start_linkarr_##name) #define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) #else - // Linker arrays are not supported on this platform. Make macros no-ops. +// Linker arrays are not supported on this platform. Make macros no-ops. #define UPB_LINKARR_APPEND(name) #define UPB_LINKARR_DECLARE(name, type) \ UPB_STATIC_ASSERT(sizeof("__la_" #name) <= 17, \ @@ -19734,5 +19724,3 @@ #undef _UPB_STRINGIFY #undef _UPB_STRINGIFY2 #undef UPB_CONSTRUCTOR -#undef UPB_RETAIN -#undef UPB_HIDDEN
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c index 55a25d3..e5766f5 100644 --- a/ruby/ext/google/protobuf_c/ruby-upb.c +++ b/ruby/ext/google/protobuf_c/ruby-upb.c
@@ -495,7 +495,7 @@ /* aarch64 supports big and little endian modes; fasttable performs multibyte * tag loads assumes the tag of a varint is in the low bits. */ -#if !defined(_WIN32) && (defined(__x86_64__) || defined(__AARCH64EL__)) && \ +#if (defined(__x86_64__) || defined(__AARCH64EL__)) && \ UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail) #define UPB_FASTTABLE_SUPPORTED 1 #else @@ -514,11 +514,7 @@ * This is useful for releasing code that might be used on multiple platforms, * for example the PHP or Ruby C extensions. */ #elif defined(UPB_TRY_ENABLE_FASTTABLE) -#if UPB_FASTTABLE_SUPPORTED -#define UPB_FASTTABLE 1 -#else -#define UPB_FASTTABLE 0 -#endif +#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED #else #define UPB_FASTTABLE 0 #endif @@ -572,12 +568,6 @@ #define UPB_RETAIN #endif -#if defined(__GNUC__) || defined(__clang__) -#define UPB_HIDDEN __attribute__((visibility("hidden"))) -#else -#define UPB_HIDDEN -#endif - // Linker arrays combine elements from multiple translation units into a single // array that can be iterated over at runtime. // @@ -631,7 +621,7 @@ #elif defined(__MACH__) - /* As described in: https://stackoverflow.com/a/22366882 */ +/* As described in: https://stackoverflow.com/a/22366882 */ #define UPB_LINKARR_APPEND(name) \ __attribute__(( \ section("__DATA,__la_" #name))) UPB_LINKARR_ATTR UPB_NO_SANITIZE_ADDRESS @@ -650,10 +640,10 @@ #elif defined(_MSC_VER) - /* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ +/* See: + * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 + * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 + * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ #define UPB_STRINGIFY_INTERNAL(x) #x #define UPB_STRINGIFY(x) UPB_STRINGIFY_INTERNAL(x) #define UPB_CONCAT(a, b, c) a##b##c @@ -662,7 +652,7 @@ #define UPB_LINKARR_APPEND(name) \ __pragma(section(UPB_LINKARR_NAME(name, $j), read)) \ __declspec(allocate(UPB_LINKARR_NAME(name, $j))) - // clang-format off +// clang-format off #define UPB_LINKARR_DECLARE(name, type) \ __pragma(message(UPB_LINKARR_NAME(name, $j))) \ __pragma(section(UPB_LINKARR_NAME(name, $a), read)) \ @@ -673,13 +663,13 @@ type __stop_linkarr_##name; \ UPB_LINKARR_APPEND(name) \ __declspec(selectany) type UPB_linkarr_internal_empty_##name[1] = {0} - // clang-format on +// clang-format on #define UPB_LINKARR_START(name) (&__start_linkarr_##name) #define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) #else - // Linker arrays are not supported on this platform. Make macros no-ops. +// Linker arrays are not supported on this platform. Make macros no-ops. #define UPB_LINKARR_APPEND(name) #define UPB_LINKARR_DECLARE(name, type) \ UPB_STATIC_ASSERT(sizeof("__la_" #name) <= 17, \ @@ -19117,5 +19107,3 @@ #undef _UPB_STRINGIFY #undef _UPB_STRINGIFY2 #undef UPB_CONSTRUCTOR -#undef UPB_RETAIN -#undef UPB_HIDDEN
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index 2e5485a..4b9ecbc 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h
@@ -494,7 +494,7 @@ /* aarch64 supports big and little endian modes; fasttable performs multibyte * tag loads assumes the tag of a varint is in the low bits. */ -#if !defined(_WIN32) && (defined(__x86_64__) || defined(__AARCH64EL__)) && \ +#if (defined(__x86_64__) || defined(__AARCH64EL__)) && \ UPB_HAS_ATTRIBUTE(preserve_none) && UPB_HAS_ATTRIBUTE(musttail) #define UPB_FASTTABLE_SUPPORTED 1 #else @@ -513,11 +513,7 @@ * This is useful for releasing code that might be used on multiple platforms, * for example the PHP or Ruby C extensions. */ #elif defined(UPB_TRY_ENABLE_FASTTABLE) -#if UPB_FASTTABLE_SUPPORTED -#define UPB_FASTTABLE 1 -#else -#define UPB_FASTTABLE 0 -#endif +#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED #else #define UPB_FASTTABLE 0 #endif @@ -571,12 +567,6 @@ #define UPB_RETAIN #endif -#if defined(__GNUC__) || defined(__clang__) -#define UPB_HIDDEN __attribute__((visibility("hidden"))) -#else -#define UPB_HIDDEN -#endif - // Linker arrays combine elements from multiple translation units into a single // array that can be iterated over at runtime. // @@ -630,7 +620,7 @@ #elif defined(__MACH__) - /* As described in: https://stackoverflow.com/a/22366882 */ +/* As described in: https://stackoverflow.com/a/22366882 */ #define UPB_LINKARR_APPEND(name) \ __attribute__(( \ section("__DATA,__la_" #name))) UPB_LINKARR_ATTR UPB_NO_SANITIZE_ADDRESS @@ -649,10 +639,10 @@ #elif defined(_MSC_VER) - /* See: - * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 - * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 - * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ +/* See: + * https://devblogs.microsoft.com/oldnewthing/20181107-00/?p=100155 + * https://devblogs.microsoft.com/oldnewthing/20181108-00/?p=100165 + * https://devblogs.microsoft.com/oldnewthing/20181109-00/?p=100175 */ #define UPB_STRINGIFY_INTERNAL(x) #x #define UPB_STRINGIFY(x) UPB_STRINGIFY_INTERNAL(x) #define UPB_CONCAT(a, b, c) a##b##c @@ -661,7 +651,7 @@ #define UPB_LINKARR_APPEND(name) \ __pragma(section(UPB_LINKARR_NAME(name, $j), read)) \ __declspec(allocate(UPB_LINKARR_NAME(name, $j))) - // clang-format off +// clang-format off #define UPB_LINKARR_DECLARE(name, type) \ __pragma(message(UPB_LINKARR_NAME(name, $j))) \ __pragma(section(UPB_LINKARR_NAME(name, $a), read)) \ @@ -672,13 +662,13 @@ type __stop_linkarr_##name; \ UPB_LINKARR_APPEND(name) \ __declspec(selectany) type UPB_linkarr_internal_empty_##name[1] = {0} - // clang-format on +// clang-format on #define UPB_LINKARR_START(name) (&__start_linkarr_##name) #define UPB_LINKARR_STOP(name) (&__stop_linkarr_##name) #else - // Linker arrays are not supported on this platform. Make macros no-ops. +// Linker arrays are not supported on this platform. Make macros no-ops. #define UPB_LINKARR_APPEND(name) #define UPB_LINKARR_DECLARE(name, type) \ UPB_STATIC_ASSERT(sizeof("__la_" #name) <= 17, \ @@ -19558,5 +19548,3 @@ #undef _UPB_STRINGIFY #undef _UPB_STRINGIFY2 #undef UPB_CONSTRUCTOR -#undef UPB_RETAIN -#undef UPB_HIDDEN
diff --git a/src/file_lists.cmake b/src/file_lists.cmake index b0fea98..2081b86 100644 --- a/src/file_lists.cmake +++ b/src/file_lists.cmake
@@ -752,17 +752,6 @@ ${protobuf_SOURCE_DIR}/upb/util/required_fields.c ${protobuf_SOURCE_DIR}/upb/wire/byte_size.c ${protobuf_SOURCE_DIR}/upb/wire/decode.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/cardinality.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/dispatch.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_extension.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_fixed.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_generic.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_message.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_mismatch.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_string.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_unknown.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_varint.c - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/function_array.c ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/select.c ${protobuf_SOURCE_DIR}/upb/wire/encode.c ${protobuf_SOURCE_DIR}/upb/wire/encode_extension.c @@ -895,9 +884,6 @@ ${protobuf_SOURCE_DIR}/upb/wire/decode.h ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/combinations.h ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/data.h - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/dispatch.h - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/field_parsers.h - ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/function_array.h ${protobuf_SOURCE_DIR}/upb/wire/decode_fast/select.h ${protobuf_SOURCE_DIR}/upb/wire/encode.h ${protobuf_SOURCE_DIR}/upb/wire/encode_extension.h