diff options
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_helpers.h')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_helpers.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.h b/src/google/protobuf/compiler/cpp/cpp_helpers.h index 1cff17c8..e60fa7c2 100644 --- a/src/google/protobuf/compiler/cpp/cpp_helpers.h +++ b/src/google/protobuf/compiler/cpp/cpp_helpers.h @@ -149,6 +149,10 @@ inline bool UseUnknownFieldSet(const FileDescriptor* file) { } +// Does the file have any map fields, necessitating the file to include +// map_field_inl.h and map.h. +bool HasMapFields(const FileDescriptor* file); + // Does this file have any enum type definitions? bool HasEnumDefinitions(const FileDescriptor* file); @@ -200,6 +204,10 @@ void PrintHandlingOptionalStaticInitializers( const char* without_static_init); +inline bool IsMapEntryMessage(const Descriptor* descriptor) { + return descriptor->options().map_entry(); +} + // Returns true if the field's CPPTYPE is string or message. bool IsStringOrMessage(const FieldDescriptor* field); @@ -216,7 +224,7 @@ inline bool HasPreservingUnknownEnumSemantics(const FileDescriptor* file) { } inline bool SupportsArenas(const FileDescriptor* file) { - return true; + return file->options().cc_enable_arenas(); } inline bool SupportsArenas(const Descriptor* desc) { |