Remove code for the paused linker-guided field stripping (go/lgpfs-paused).

PiperOrigin-RevId: 544763667
pull/13175/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent d4cd481e60
commit 528344245e
  1. 4
      src/google/protobuf/compiler/cpp/helpers.h
  2. 6
      src/google/protobuf/compiler/cpp/message.cc

@ -396,10 +396,6 @@ bool ShouldSplit(const FieldDescriptor* field, const Options& options);
bool ShouldForceAllocationOnConstruction(const Descriptor* desc,
const Options& options);
inline bool IsFieldUsed(const FieldDescriptor* /* field */, const Options&) {
return true;
}
// Does the file contain any definitions that need extension_set.h?
bool HasExtensionsOrExtendableMessage(const FileDescriptor* file);

@ -3999,12 +3999,6 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBodyShuffled(
std::vector<const FieldDescriptor*> ordered_fields =
SortFieldsByNumber(descriptor_);
ordered_fields.erase(
std::remove_if(ordered_fields.begin(), ordered_fields.end(),
[this](const FieldDescriptor* f) {
return !IsFieldUsed(f, options_);
}),
ordered_fields.end());
std::vector<const Descriptor::ExtensionRange*> sorted_extensions;
sorted_extensions.reserve(descriptor_->extension_range_count());

Loading…
Cancel
Save