Skip to content

Commit 3079d15

Browse files
Delete safe_boundary_check as this now supported via build flag, --//third_party/protobuf:bounds_check_mode.
PiperOrigin-RevId: 836327114
1 parent aeb5f2d commit 3079d15

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/google/protobuf/compiler/cpp/generator.cc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,6 @@ bool CppGenerator::GenerateAll(const std::vector<const FileDescriptor*>& files,
351351

352352
if (key == "dllexport_decl") {
353353
common_file_options.dllexport_decl = value;
354-
} else if (key == "safe_boundary_check") {
355-
common_file_options.bounds_check_mode =
356-
BoundsCheckMode::kReturnDefaultValue;
357-
} else if (key == "enforced_boundary_check") {
358-
common_file_options.bounds_check_mode = BoundsCheckMode::kAbort;
359354
} else if (key == "annotate_headers") {
360355
common_file_options.annotate_headers = true;
361356
} else if (key == "annotation_pragma_name") {
@@ -412,16 +407,6 @@ bool CppGenerator::GenerateAll(const std::vector<const FileDescriptor*>& files,
412407
}
413408
}
414409

415-
// The safe_boundary_check option controls behavior for Google-internal
416-
// protobuf APIs.
417-
if ((common_file_options.bounds_check_mode !=
418-
BoundsCheckMode::kNoEnforcement) &&
419-
common_file_options.opensource_runtime) {
420-
*error =
421-
"The safe_boundary_check option is not supported outside of Google.";
422-
return false;
423-
}
424-
425410
// -----------------------------------------------------------------
426411

427412
for (size_t i = 0; i < files.size(); i++) {

0 commit comments

Comments
 (0)