diff --git a/src/google/protobuf/compiler/code_generator.cc b/src/google/protobuf/compiler/code_generator.cc index feaf0ccac5..273fca0cf2 100644 --- a/src/google/protobuf/compiler/code_generator.cc +++ b/src/google/protobuf/compiler/code_generator.cc @@ -36,13 +36,13 @@ #include -#include "google/protobuf/compiler/plugin.pb.h" #include "google/protobuf/descriptor.h" #include "absl/log/absl_log.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" +#include "google/protobuf/compiler/plugin.pb.h" namespace google { namespace protobuf { diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc index 7bbfa6a1a0..1beca44ff2 100644 --- a/src/google/protobuf/compiler/command_line_interface.cc +++ b/src/google/protobuf/compiler/command_line_interface.cc @@ -79,7 +79,6 @@ #include "google/protobuf/stubs/common.h" #include "absl/log/absl_check.h" #include "absl/log/absl_log.h" -#include "google/protobuf/compiler/plugin.pb.h" #include "absl/container/flat_hash_set.h" #include "absl/strings/match.h" #include "absl/strings/str_format.h" @@ -89,6 +88,7 @@ #include "absl/strings/substitute.h" #include "google/protobuf/compiler/code_generator.h" #include "google/protobuf/compiler/importer.h" +#include "google/protobuf/compiler/plugin.pb.h" #include "google/protobuf/compiler/retention.h" #include "google/protobuf/compiler/subprocess.h" #include "google/protobuf/compiler/zip_writer.h" diff --git a/src/google/protobuf/compiler/cpp/file.cc b/src/google/protobuf/compiler/cpp/file.cc index c32bcd27bd..e3e0130e93 100644 --- a/src/google/protobuf/compiler/cpp/file.cc +++ b/src/google/protobuf/compiler/cpp/file.cc @@ -170,7 +170,7 @@ void FileGenerator::GenerateMacroUndefs(io::Printer* p) { // Only do this for protobuf's own types. There are some google3 protos using // macros as field names and the generated code compiles after the macro // expansion. Undefing these macros actually breaks such code. - if (file_->name() != "net/proto2/compiler/proto/plugin.proto" && + if (file_->name() != "third_party/protobuf/compiler/plugin.proto" && file_->name() != "google/protobuf/compiler/plugin.proto") { return; } diff --git a/src/google/protobuf/compiler/cpp/helpers.cc b/src/google/protobuf/compiler/cpp/helpers.cc index ad10f372c5..b1894cf063 100644 --- a/src/google/protobuf/compiler/cpp/helpers.cc +++ b/src/google/protobuf/compiler/cpp/helpers.cc @@ -1396,8 +1396,8 @@ bool GetBootstrapBasename(const Options& options, absl::string_view basename, new absl::flat_hash_map{ {"net/proto2/proto/descriptor", "third_party/protobuf/descriptor"}, - {"net/proto2/compiler/proto/plugin", - "net/proto2/compiler/proto/plugin"}, + {"third_party/protobuf/compiler/plugin", + "third_party/protobuf/compiler/plugin"}, {"net/proto2/compiler/proto/profile", "net/proto2/compiler/proto/profile_bootstrap"}, }; diff --git a/src/google/protobuf/compiler/mock_code_generator.cc b/src/google/protobuf/compiler/mock_code_generator.cc index 56184a7b49..d1ff90b61c 100644 --- a/src/google/protobuf/compiler/mock_code_generator.cc +++ b/src/google/protobuf/compiler/mock_code_generator.cc @@ -43,7 +43,6 @@ #include "google/protobuf/testing/file.h" #include "google/protobuf/testing/file.h" -#include "google/protobuf/compiler/plugin.pb.h" #include "google/protobuf/descriptor.pb.h" #include #include "absl/log/absl_check.h" @@ -55,6 +54,7 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/strings/substitute.h" +#include "google/protobuf/compiler/plugin.pb.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/io/printer.h" #include "google/protobuf/io/zero_copy_stream.h" diff --git a/src/google/protobuf/compiler/plugin.cc b/src/google/protobuf/compiler/plugin.cc index 76993b1b8b..c077841987 100644 --- a/src/google/protobuf/compiler/plugin.cc +++ b/src/google/protobuf/compiler/plugin.cc @@ -39,8 +39,8 @@ #include #endif -#include "google/protobuf/compiler/plugin.pb.h" #include "google/protobuf/compiler/code_generator.h" +#include "google/protobuf/compiler/plugin.pb.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/descriptor.pb.h" #include "google/protobuf/io/io_win32.h"