Skip to content

Commit

Permalink
Objc update WKT generated import paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
yulin-liang committed Jun 16, 2020
1 parent 09fa0ef commit 83e679f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/compiler/objective_c_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ inline ::grpc::string ImportProtoHeaders(

::grpc::string base_name = header;
grpc_generator::StripPrefix(&base_name, "google/protobuf/");
::grpc::string file_name = "GPB" + base_name;
// create the import code snippet
::grpc::string framework_header =
::grpc::string(ProtobufLibraryFrameworkName) + "/" + base_name;
::grpc::string(ProtobufLibraryFrameworkName) + "/" + file_name;

static const ::grpc::string kFrameworkImportsCondition =
"GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS";
return PreprocIfElse(kFrameworkImportsCondition,
indent + SystemImport(framework_header),
indent + LocalImport(header));
indent + LocalImport(file_name));
}

} // namespace
Expand Down

0 comments on commit 83e679f

Please sign in to comment.