diff --git a/src/google/protobuf/extension_set.h b/src/google/protobuf/extension_set.h index 3be56c4724..aba66c23a5 100644 --- a/src/google/protobuf/extension_set.h +++ b/src/google/protobuf/extension_set.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "google/protobuf/stubs/common.h" @@ -83,6 +84,10 @@ namespace internal { class InternalMetadata; +namespace v2 { +class TableDriven; +} // namespace v2 + // Used to store values of type WireFormatLite::FieldType without having to // #include wire_format_lite.h. Also, ensures that we use only one byte to // store these values, which is important to keep the layout of @@ -567,6 +572,7 @@ class PROTOBUF_EXPORT ExtensionSet { friend class google::protobuf::internal::ReflectionVisit; friend struct google::protobuf::internal::DynamicExtensionInfoHelper; friend class google::protobuf::internal::WireFormat; + friend class google::protobuf::internal::v2::TableDriven; friend void internal::InitializeLazyExtensionSet(); @@ -645,6 +651,9 @@ class PROTOBUF_EXPORT ExtensionSet { virtual size_t ByteSizeLong() const = 0; virtual size_t SpaceUsedLong() const = 0; + virtual std::variant UnparsedSizeOrMessage() + const = 0; + virtual void MergeFrom(const MessageLite* prototype, const LazyMessageExtension& other, Arena* arena, Arena* other_arena) = 0; diff --git a/src/google/protobuf/extension_set_heavy.cc b/src/google/protobuf/extension_set_heavy.cc index 134d08296a..96d363e2ab 100644 --- a/src/google/protobuf/extension_set_heavy.cc +++ b/src/google/protobuf/extension_set_heavy.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include "absl/base/attributes.h"