aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/objective_c_generator_helpers.h
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-06-05 11:57:12 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-06-05 11:57:12 -0700
commitc4f84819bd92ccc1851647727400407bb9366564 (patch)
treeeb2d40d237b3abf001d8dc6ac1fc9bd2c3346674 /src/compiler/objective_c_generator_helpers.h
parent88d937736548544077357a0bb74df52f275dec7e (diff)
Backward compatibility
Diffstat (limited to 'src/compiler/objective_c_generator_helpers.h')
-rw-r--r--src/compiler/objective_c_generator_helpers.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/objective_c_generator_helpers.h b/src/compiler/objective_c_generator_helpers.h
index 3ebd1b1444..3048fe273a 100644
--- a/src/compiler/objective_c_generator_helpers.h
+++ b/src/compiler/objective_c_generator_helpers.h
@@ -46,8 +46,12 @@ using ::grpc::protobuf::FileDescriptor;
using ::grpc::protobuf::ServiceDescriptor;
using ::grpc::string;
-inline string MessageHeaderName(const FileDescriptor *file) {
- return google::protobuf::compiler::objectivec::FilePath(file) + ".pbobjc.h";
+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 ServiceClassName(const ServiceDescriptor *service) {