[ObjC] rename the file to drop the "objectivec_" prefix.

Since "names.(h|cc)" now exists, drop the prefixing on all the files.
pull/10720/head
Thomas Van Lenten 2 years ago
parent f093050230
commit 53d8b03643
  1. 2
      objectivec/DevTools/check_version_stamps.sh
  2. 4
      objectivec/GPBDescriptor.m
  3. 11
      objectivec/Tests/GPBMessageTests.m
  4. 52
      src/file_lists.cmake
  5. 2
      src/google/protobuf/compiler/main.cc
  6. 52
      src/google/protobuf/compiler/objectivec/BUILD.bazel
  7. 4
      src/google/protobuf/compiler/objectivec/enum.cc
  8. 0
      src/google/protobuf/compiler/objectivec/enum.h
  9. 4
      src/google/protobuf/compiler/objectivec/enum_field.cc
  10. 2
      src/google/protobuf/compiler/objectivec/enum_field.h
  11. 4
      src/google/protobuf/compiler/objectivec/extension.cc
  12. 0
      src/google/protobuf/compiler/objectivec/extension.h
  13. 12
      src/google/protobuf/compiler/objectivec/field.cc
  14. 0
      src/google/protobuf/compiler/objectivec/field.h
  15. 10
      src/google/protobuf/compiler/objectivec/file.cc
  16. 2
      src/google/protobuf/compiler/objectivec/file.h
  17. 6
      src/google/protobuf/compiler/objectivec/generator.cc
  18. 0
      src/google/protobuf/compiler/objectivec/generator.h
  19. 0
      src/google/protobuf/compiler/objectivec/helpers.h
  20. 2
      src/google/protobuf/compiler/objectivec/helpers_unittest.cc
  21. 4
      src/google/protobuf/compiler/objectivec/map_field.cc
  22. 2
      src/google/protobuf/compiler/objectivec/map_field.h
  23. 8
      src/google/protobuf/compiler/objectivec/message.cc
  24. 4
      src/google/protobuf/compiler/objectivec/message.h
  25. 4
      src/google/protobuf/compiler/objectivec/message_field.cc
  26. 2
      src/google/protobuf/compiler/objectivec/message_field.h
  27. 12
      src/google/protobuf/compiler/objectivec/method_dump.sh
  28. 4
      src/google/protobuf/compiler/objectivec/names.cc
  29. 2
      src/google/protobuf/compiler/objectivec/names.h
  30. 0
      src/google/protobuf/compiler/objectivec/nsobject_methods.h
  31. 4
      src/google/protobuf/compiler/objectivec/oneof.cc
  32. 0
      src/google/protobuf/compiler/objectivec/oneof.h
  33. 2
      src/google/protobuf/compiler/objectivec/options.h
  34. 8
      src/google/protobuf/compiler/objectivec/primitive_field.cc
  35. 2
      src/google/protobuf/compiler/objectivec/primitive_field.h

@ -16,7 +16,7 @@ die() {
exit 1
}
readonly GeneratorSrc="${ProtoRootDir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc"
readonly GeneratorSrc="${ProtoRootDir}/src/google/protobuf/compiler/objectivec/file.cc"
readonly RuntimeSrc="${ProtoRootDir}/objectivec/GPBBootstrap.h"
check_constant() {

@ -681,7 +681,7 @@ uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self) {
}
// The logic here has to match SetCommonFieldVariables() from
// objectivec_field.cc in the proto compiler.
// objectivec/field.cc in the proto compiler.
NSString *name = self.name;
NSUInteger len = [name length];
@ -918,7 +918,7 @@ uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self) {
if (extraTextFormatInfo_) {
result = GPBDecodeTextFormatName(extraTextFormatInfo_, (int32_t)index, shortName);
}
// Logic here needs to match what objectivec_enum.cc does in the proto
// Logic here needs to match what objectivec/enum.cc does in the proto
// compiler.
if (result == nil) {
NSUInteger len = [shortName length];

@ -1843,8 +1843,8 @@
}
- (void)testPropertyNaming {
// objectivec_helpers.cc has some special handing to get proper all caps
// for a few cases to meet objc developer expectations.
// names.cc has some special handing to get proper all caps for a few cases to
// meet objc developer expectations.
//
// This "test" confirms that the expected names are generated, otherwise the
// test itself will fail to compile.
@ -1861,7 +1861,7 @@
}
- (void)testEnumNaming {
// objectivec_helpers.cc has some interesting cases to deal with in
// names.cc has some interesting cases to deal with in
// EnumValueName/EnumValueShortName. Confirm that things generated as
// expected.
@ -1966,9 +1966,8 @@
}
- (void)testReservedWordNaming {
// objectivec_helpers.cc has some special handing to make sure that
// some "reserved" objc names get renamed in a way so they
// don't conflict.
// names.cc has some special handing to make sure that some "reserved" objc
// names get renamed in a way so they don't conflict.
//
// This "test" confirms that the expected names are generated,
// otherwise the test itself will fail to compile.

@ -350,18 +350,18 @@ set(libprotoc_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/shared_code_generator.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/string_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/string_field_lite.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/enum.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/enum_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/extension.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/file.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/generator.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/map_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/message.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/message_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/names.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_file.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_message.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/oneof.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/primitive_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/php/names.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/php/php_generator.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/plugin.cc
@ -446,21 +446,21 @@ set(libprotoc_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/shared_code_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/string_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/string_field_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/enum.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/enum_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/extension.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/file.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/helpers.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/map_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/message_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/names.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_enum.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_extension.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_file.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_options.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/nsobject_methods.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/oneof.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/options.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/primitive_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/php/names.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/php/php_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/plugin.h
@ -679,7 +679,7 @@ set(compiler_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/doc_comment_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/message_serialization_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/plugin_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/helpers_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/parser_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/python/plugin_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc

@ -33,7 +33,7 @@
#include "google/protobuf/compiler/java/kotlin_generator.h"
#include "google/protobuf/compiler/command_line_interface.h"
#include "google/protobuf/compiler/csharp/csharp_generator.h"
#include "google/protobuf/compiler/objectivec/objectivec_generator.h"
#include "google/protobuf/compiler/objectivec/generator.h"
#include "google/protobuf/compiler/php/php_generator.h"
#include "google/protobuf/compiler/python/generator.h"
#include "google/protobuf/compiler/python/pyi_generator.h"

@ -21,7 +21,7 @@ cc_library(
name = "names_internal",
hdrs = [
"names.h",
"objectivec_nsobject_methods.h",
"nsobject_methods.h",
],
srcs = [
"names.cc",
@ -38,32 +38,32 @@ cc_library(
cc_library(
name = "objectivec",
srcs = [
"objectivec_enum.cc",
"objectivec_enum_field.cc",
"objectivec_extension.cc",
"objectivec_field.cc",
"objectivec_file.cc",
"objectivec_generator.cc",
"objectivec_map_field.cc",
"objectivec_message.cc",
"objectivec_message_field.cc",
"objectivec_oneof.cc",
"objectivec_primitive_field.cc",
"enum.cc",
"enum_field.cc",
"extension.cc",
"field.cc",
"file.cc",
"generator.cc",
"map_field.cc",
"message.cc",
"message_field.cc",
"oneof.cc",
"primitive_field.cc",
],
hdrs = [
"objectivec_enum.h",
"objectivec_enum_field.h",
"objectivec_extension.h",
"objectivec_field.h",
"objectivec_file.h",
"objectivec_generator.h",
"objectivec_helpers.h",
"objectivec_map_field.h",
"objectivec_message.h",
"objectivec_message_field.h",
"objectivec_oneof.h",
"objectivec_options.h",
"objectivec_primitive_field.h",
"enum.h",
"enum_field.h",
"extension.h",
"field.h",
"file.h",
"generator.h",
"helpers.h",
"map_field.h",
"message.h",
"message_field.h",
"oneof.h",
"options.h",
"primitive_field.h",
],
copts = COPTS,
include_prefix = "google/protobuf/compiler/objectivec",
@ -81,7 +81,7 @@ cc_library(
cc_test(
name = "helpers_unittest",
srcs = ["objectivec_helpers_unittest.cc"],
srcs = ["helpers_unittest.cc"],
deps = [
":objectivec",
"//src/google/protobuf/io",

@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_enum.h"
#include "google/protobuf/compiler/objectivec/enum.h"
#include <algorithm>
#include <map>
@ -36,7 +36,7 @@
#include "absl/strings/escaping.h"
#include "absl/strings/str_cat.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/io/printer.h"
namespace google {

@ -31,8 +31,8 @@
#include <map>
#include <string>
#include "google/protobuf/compiler/objectivec/objectivec_enum_field.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/enum_field.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/io/printer.h"
namespace google {

@ -33,7 +33,7 @@
#include <map>
#include <string>
#include "google/protobuf/compiler/objectivec/objectivec_field.h"
#include "google/protobuf/compiler/objectivec/field.h"
namespace google {
namespace protobuf {

@ -28,12 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_extension.h"
#include "google/protobuf/compiler/objectivec/extension.h"
#include <iostream>
#include "absl/strings/str_cat.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/descriptor.pb.h"
#include "google/protobuf/io/printer.h"

@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_field.h"
#include "google/protobuf/compiler/objectivec/field.h"
#include <iostream>
#include "absl/strings/str_cat.h"
#include "google/protobuf/compiler/objectivec/objectivec_enum_field.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/objectivec_map_field.h"
#include "google/protobuf/compiler/objectivec/objectivec_message_field.h"
#include "google/protobuf/compiler/objectivec/objectivec_primitive_field.h"
#include "google/protobuf/compiler/objectivec/enum_field.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/compiler/objectivec/map_field.h"
#include "google/protobuf/compiler/objectivec/message_field.h"
#include "google/protobuf/compiler/objectivec/primitive_field.h"
#include "google/protobuf/io/printer.h"
namespace google {

@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_file.h"
#include "google/protobuf/compiler/objectivec/file.h"
#include <algorithm>
#include <iostream>
@ -36,10 +36,10 @@
#include "google/protobuf/compiler/code_generator.h"
#include "absl/strings/str_cat.h"
#include "google/protobuf/compiler/objectivec/objectivec_enum.h"
#include "google/protobuf/compiler/objectivec/objectivec_extension.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/objectivec_message.h"
#include "google/protobuf/compiler/objectivec/enum.h"
#include "google/protobuf/compiler/objectivec/extension.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/compiler/objectivec/message.h"
#include "google/protobuf/io/printer.h"
// NOTE: src/google/protobuf/compiler/plugin.cc makes use of cerr for some

@ -35,7 +35,7 @@
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "google/protobuf/compiler/objectivec/objectivec_options.h"
#include "google/protobuf/compiler/objectivec/options.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/io/printer.h"

@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_generator.h"
#include "google/protobuf/compiler/objectivec/generator.h"
#include <fstream>
#include <iostream>
@ -38,8 +38,8 @@
#include "absl/strings/ascii.h"
#include "absl/strings/str_split.h"
#include "absl/strings/strip.h"
#include "google/protobuf/compiler/objectivec/objectivec_file.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/file.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/io/printer.h"
#include "google/protobuf/io/zero_copy_stream.h"

@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
#include <gtest/gtest.h>

@ -31,8 +31,8 @@
#include <map>
#include <string>
#include "google/protobuf/compiler/objectivec/objectivec_map_field.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/map_field.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/io/printer.h"
namespace google {

@ -34,7 +34,7 @@
#include <map>
#include <string>
#include "google/protobuf/compiler/objectivec/objectivec_field.h"
#include "google/protobuf/compiler/objectivec/field.h"
namespace google {
namespace protobuf {

@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_message.h"
#include "google/protobuf/compiler/objectivec/message.h"
#include <algorithm>
#include <iostream>
@ -36,9 +36,9 @@
#include "absl/strings/escaping.h"
#include "absl/strings/str_cat.h"
#include "google/protobuf/compiler/objectivec/objectivec_enum.h"
#include "google/protobuf/compiler/objectivec/objectivec_extension.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/enum.h"
#include "google/protobuf/compiler/objectivec/extension.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/descriptor.pb.h"
#include "google/protobuf/io/printer.h"

@ -34,8 +34,8 @@
#include <string>
#include <set>
#include <vector>
#include "google/protobuf/compiler/objectivec/objectivec_field.h"
#include "google/protobuf/compiler/objectivec/objectivec_oneof.h"
#include "google/protobuf/compiler/objectivec/field.h"
#include "google/protobuf/compiler/objectivec/oneof.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/io/printer.h"

@ -31,8 +31,8 @@
#include <map>
#include <string>
#include "google/protobuf/compiler/objectivec/objectivec_message_field.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/message_field.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/io/printer.h"
namespace google {

@ -34,7 +34,7 @@
#include <map>
#include <string>
#include "google/protobuf/compiler/objectivec/objectivec_field.h"
#include "google/protobuf/compiler/objectivec/field.h"
namespace google {
namespace protobuf {

@ -1,7 +1,7 @@
#!/bin/bash
# Updates objectivec_nsobject_methods.h by generating a list of all of the properties
# and methods on NSObject that Protobufs should not overload from iOS and macOS combined.
# Updates nsobject_methods.h by generating a list of all of the properties and
# methods on NSObject that Protobufs should not overload from iOS and macOS combined.
#
# The rules:
# - No property should ever be overloaded.
@ -110,7 +110,7 @@ END_FOOTER
)
# Check to make sure we are updating the correct file.
if [[ ! -e "objectivec_nsobject_methods.h" ]]; then
if [[ ! -e "nsobject_methods.h" ]]; then
echo "error: Must be run in the src/google/protobuf/compiler/objectivec directory"
exit 1
fi
@ -154,7 +154,7 @@ echo $"$file_footer" >> "$temp_dir"/methods_sorted.txt
# Check for differences. Turn off error checking because we expect diff to fail when
# there are no differences.
set +e
diff_out=$(diff -I "^//.*$" "$temp_dir"/methods_sorted.txt objectivec_nsobject_methods.h)
diff_out=$(diff -I "^//.*$" "$temp_dir"/methods_sorted.txt nsobject_methods.h)
removed_methods=$(echo "$diff_out" | grep '^>.*$')
set -e
if [[ -n "$removed_methods" ]]; then
@ -168,12 +168,12 @@ if [[ -n "$removed_methods" ]]; then
echo "$removed_methods"
echo ""
echo "New Version: $temp_dir/methods_sorted.txt"
echo "Old Version: objectivec_nsobject_methods.h"
echo "Old Version: nsobject_methods.h"
exit 1
fi
if [[ -n "$diff_out" ]]; then
echo "Added Methods:"
echo "$(echo "$diff_out" | grep '^<.*$' | sed -e 's/^< "\(.*\)",$/ \1/')"
fi;
cp "$temp_dir"/methods_sorted.txt objectivec_nsobject_methods.h
cp "$temp_dir"/methods_sorted.txt nsobject_methods.h
rm -rf "$temp_dir"

@ -50,7 +50,7 @@
#include "absl/strings/str_split.h"
#include "absl/strings/strip.h"
#include "google/protobuf/compiler/objectivec/names.h"
#include "google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h"
#include "google/protobuf/compiler/objectivec/nsobject_methods.h"
#include "google/protobuf/descriptor.pb.h"
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/io/io_win32.h"
@ -377,7 +377,7 @@ std::string UnderscoresToCamelCase(const std::string& input,
const char* const kReservedWordList[] = {
// Note NSObject Methods:
// These are brought in from objectivec_nsobject_methods.h that is generated
// These are brought in from nsobject_methods.h that is generated
// using method_dump.sh. See kNSObjectMethods below.
// Objective C "keywords" that aren't in C

@ -70,7 +70,7 @@ void PROTOC_EXPORT SetProtoPackagePrefixExceptionList(
std::string PROTOC_EXPORT GetForcedPackagePrefix();
void PROTOC_EXPORT SetForcedPackagePrefix(const std::string& prefix);
// Generator Prefix Validation Options (see objectivec_generator.cc for a
// Generator Prefix Validation Options (see generator.cc for a
// description of each):
struct Options {
Options();

@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_oneof.h"
#include "google/protobuf/compiler/objectivec/oneof.h"
#include <map>
#include <string>
#include "absl/strings/str_cat.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/io/printer.h"
namespace google {

@ -38,7 +38,7 @@ namespace protobuf {
namespace compiler {
namespace objectivec {
// Generation options, documented within objectivec_generator.cc.
// Generation options, documented within generator.cc.
struct GenerationOptions {
std::string generate_for_named_framework;
std::string named_framework_to_proto_path_mappings_path;

@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/protobuf/compiler/objectivec/objectivec_primitive_field.h"
#include "google/protobuf/compiler/objectivec/primitive_field.h"
#include <map>
#include <string>
#include "absl/strings/str_cat.h"
#include "google/protobuf/compiler/objectivec/objectivec_helpers.h"
#include "google/protobuf/compiler/objectivec/helpers.h"
#include "google/protobuf/io/printer.h"
namespace google {
@ -71,7 +71,7 @@ const char* PrimitiveTypeName(const FieldDescriptor* descriptor) {
case OBJECTIVECTYPE_ENUM:
return "int32_t";
case OBJECTIVECTYPE_MESSAGE:
return NULL; // Messages go through objectivec_message_field.cc|h.
return NULL; // Messages go through message_field.cc|h.
}
// Some compilers report reaching end of function even though all cases of
@ -104,7 +104,7 @@ const char* PrimitiveArrayTypeName(const FieldDescriptor* descriptor) {
case OBJECTIVECTYPE_ENUM:
return "Enum";
case OBJECTIVECTYPE_MESSAGE:
// Want NSArray (but goes through objectivec_message_field.cc|h).
// Want NSArray (but goes through message_field.cc|h).
return "";
}

@ -31,7 +31,7 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_PRIMITIVE_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_PRIMITIVE_FIELD_H__
#include "google/protobuf/compiler/objectivec/objectivec_field.h"
#include "google/protobuf/compiler/objectivec/field.h"
namespace google {
namespace protobuf {
Loading…
Cancel
Save