From 10cb45654555198731399811f6de744f43099305 Mon Sep 17 00:00:00 2001
From: Protobuf Team Bot <protobuf-github-bot@google.com>
Date: Tue, 28 Feb 2023 13:36:26 -0800
Subject: [PATCH] Removing dependency of command_line_interface from
 cpp_internal.

PiperOrigin-RevId: 513025937
---
 src/google/protobuf/compiler/cpp/BUILD.bazel  | 1 -
 src/google/protobuf/compiler/cpp/generator.cc | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/google/protobuf/compiler/cpp/BUILD.bazel b/src/google/protobuf/compiler/cpp/BUILD.bazel
index c140927fa6..bd6944025e 100644
--- a/src/google/protobuf/compiler/cpp/BUILD.bazel
+++ b/src/google/protobuf/compiler/cpp/BUILD.bazel
@@ -85,7 +85,6 @@ cc_library(
         ":names",
         ":names_internal",
         "//src/google/protobuf/compiler:code_generator",
-        "//src/google/protobuf/compiler:command_line_interface",
         "//src/google/protobuf/compiler:retention",
         "@com_google_absl//absl/base:core_headers",
         "@com_google_absl//absl/container:btree",
diff --git a/src/google/protobuf/compiler/cpp/generator.cc b/src/google/protobuf/compiler/cpp/generator.cc
index 265c97dcac..ab26320078 100644
--- a/src/google/protobuf/compiler/cpp/generator.cc
+++ b/src/google/protobuf/compiler/cpp/generator.cc
@@ -43,7 +43,6 @@
 #include "absl/strings/match.h"
 #include "absl/strings/str_cat.h"
 #include "absl/strings/string_view.h"
-#include "google/protobuf/compiler/command_line_interface.h"
 #include "google/protobuf/compiler/cpp/file.h"
 #include "google/protobuf/compiler/cpp/helpers.h"
 #include "google/protobuf/descriptor.pb.h"
@@ -53,6 +52,7 @@ namespace protobuf {
 namespace compiler {
 namespace cpp {
 namespace {
+
 std::string NumberedCcFileName(absl::string_view basename, int number) {
   return absl::StrCat(basename, ".out/", number, ".cc");
 }
@@ -163,8 +163,7 @@ bool CppGenerator::Generate(const FileDescriptor* file,
     } else if (key == "annotate_accessor") {
       file_options.annotate_accessor = true;
     } else if (key == "protos_for_field_listener_events") {
-      for (absl::string_view proto :
-           absl::StrSplit(value, CommandLineInterface::kPathSeparator)) {
+      for (absl::string_view proto : absl::StrSplit(value, ':')) {
         if (proto == file->name()) {
           file_options.field_listener_options.inject_field_listener_events =
               true;