Skip to content

Commit

Permalink
Replace ColdChunkSkipper with iterator-based approach.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 537185836
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jun 2, 2023
1 parent 46ea61a commit ad677f3
Show file tree
Hide file tree
Showing 3 changed files with 295 additions and 288 deletions.
4 changes: 4 additions & 0 deletions src/google/protobuf/compiler/cpp/helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ std::string IntTypeName(const Options& options, absl::string_view type) {

} // namespace

bool IsRarelyPresent(const FieldDescriptor* field, const Options& options) {
return false;
}

bool IsLazy(const FieldDescriptor* field, const Options& options,
MessageSCCAnalyzer* scc_analyzer) {
return IsLazilyVerifiedLazy(field, options) ||
Expand Down
3 changes: 3 additions & 0 deletions src/google/protobuf/compiler/cpp/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,9 @@ std::vector<io::Printer::Sub> AnnotatedAccessors(
// dynamic initialization.
bool IsFileDescriptorProto(const FileDescriptor* file, const Options& options);

// Returns true if `field` is unlikely to be present based on PDProto profile.
bool IsRarelyPresent(const FieldDescriptor* field, const Options& options);

} // namespace cpp
} // namespace compiler
} // namespace protobuf
Expand Down
Loading

0 comments on commit ad677f3

Please sign in to comment.