aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler
diff options
context:
space:
mode:
authorGravatar Muxi Yan <muxi@users.noreply.github.com>2018-04-04 15:13:07 -0700
committerGravatar GitHub <noreply@github.com>2018-04-04 15:13:07 -0700
commit761d16eca1ae395ef0b200033ef8e81f24e8273f (patch)
treee542266c4738577467bc6c663039bc41eaea5e98 /src/compiler
parent98c1017fd9f155aad13c3b86e8f17a456c9512e8 (diff)
parent19ca19beed133f6db9c55376a5e431a610e00d28 (diff)
Merge pull request #14837 from nallohki/master
Makes @class forward decls unconditional in generated pbrpc.h files.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/objective_c_generator.cc2
-rw-r--r--src/compiler/objective_c_plugin.cc10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc
index ffdeb8f6b0..39f68cb956 100644
--- a/src/compiler/objective_c_generator.cc
+++ b/src/compiler/objective_c_generator.cc
@@ -206,7 +206,7 @@ void PrintMethodImplementations(Printer* printer,
}
}
for (auto one_class : classes) {
- output += " @class " + one_class + ";\n";
+ output += "@class " + one_class + ";\n";
}
return output;
diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc
index 76703d79cd..f0fe3688cc 100644
--- a/src/compiler/objective_c_plugin.cc
+++ b/src/compiler/objective_c_plugin.cc
@@ -118,11 +118,11 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
Write(context, file_name + ".pbrpc.h",
PreprocIfNot(kForwardDeclare, imports) + "\n" +
PreprocIfNot(kProtocolOnly, system_imports) + "\n" +
- PreprocIfElse(kForwardDeclare, class_declarations,
- class_imports) +
- "\n" + forward_declarations + "\n" + kNonNullBegin + "\n" +
- protocols + "\n" + PreprocIfNot(kProtocolOnly, interfaces) +
- "\n" + kNonNullEnd + "\n");
+ class_declarations + "\n" +
+ PreprocIfNot(kForwardDeclare, class_imports) + "\n" +
+ forward_declarations + "\n" + kNonNullBegin + "\n" + protocols +
+ "\n" + PreprocIfNot(kProtocolOnly, interfaces) + "\n" +
+ kNonNullEnd + "\n");
}
{