aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-06-08 10:06:39 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-06-08 10:25:19 -0700
commitd044281286961f6f26f09fb4ba34a32603b021b0 (patch)
tree219a6e2e6940a18e39739b91863b000a0869f050 /src/compiler
parent7352bae1bb02d0d66091f85761934e7fcc1b95ef (diff)
Revert the changes to maintain backward compatibility
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/objective_c_generator_helpers.h9
-rw-r--r--src/compiler/objective_c_plugin.cc21
2 files changed, 6 insertions, 24 deletions
diff --git a/src/compiler/objective_c_generator_helpers.h b/src/compiler/objective_c_generator_helpers.h
index 6fdb942387..3ebd1b1444 100644
--- a/src/compiler/objective_c_generator_helpers.h
+++ b/src/compiler/objective_c_generator_helpers.h
@@ -46,13 +46,8 @@ using ::grpc::protobuf::FileDescriptor;
using ::grpc::protobuf::ServiceDescriptor;
using ::grpc::string;
-inline string MessageHeaderName(const FileDescriptor *file,
- bool dash_as_separator) {
- if (dash_as_separator) {
- return google::protobuf::compiler::objectivec::FilePath(file) + ".pbobjc.h";
- } else {
- return grpc_generator::FileNameInUpperCamel(file) + ".pbobjc.h";
- }
+inline string MessageHeaderName(const FileDescriptor *file) {
+ return google::protobuf::compiler::objectivec::FilePath(file) + ".pbobjc.h";
}
inline string ServiceClassName(const ServiceDescriptor *service) {
diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc
index ff980ae549..466da4c3b4 100644
--- a/src/compiler/objective_c_plugin.cc
+++ b/src/compiler/objective_c_plugin.cc
@@ -32,10 +32,6 @@
*/
// Generates Objective C gRPC service interface out of Protobuf IDL.
-// For legacy reason, output filename of this plugin is by default in uppercamel
-// case with dash "-" treated as character and preserved in the output file
-// name. If normal upper camel case (dash treated as word separator) is desired,
-// use plugin option "filename-dash-as-separator".
#include <memory>
@@ -63,17 +59,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
return true;
}
- ::grpc::string file_name;
-
- // Simple parameter parsing as we have only one parameter.
- // TODO(mxyan): Complete parameter parsing.
- bool dash_as_separator =
- (0 == parameter.compare("filename-dash-as-separator"));
- if (dash_as_separator) {
- file_name = google::protobuf::compiler::objectivec::FilePath(file);
- } else {
- file_name = grpc_generator::FileNameInUpperCamel(file);
- }
+ ::grpc::string file_name =
+ google::protobuf::compiler::objectivec::FilePath(file);
::grpc::string prefix = file->options().objc_class_prefix();
{
@@ -90,8 +77,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
// and import the files in the .pbrpc.m
::grpc::string proto_imports;
for (int i = 0; i < file->dependency_count(); i++) {
- ::grpc::string header = grpc_objective_c_generator::MessageHeaderName(
- file->dependency(i), dash_as_separator);
+ ::grpc::string header =
+ grpc_objective_c_generator::MessageHeaderName(file->dependency(i));
const grpc::protobuf::FileDescriptor *dependency = file->dependency(i);
if (IsProtobufLibraryBundledProtoFile(dependency)) {
::grpc::string base_name = header;