Skip to content

Commit

Permalink
Merge pull request #23228 from yulin-liang/protobuf_path
Browse files Browse the repository at this point in the history
Objc update WKT generated import paths.
  • Loading branch information
yulin-liang committed Jun 18, 2020
2 parents ea6c185 + 83e679f commit 80288ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/compiler/objective_c_plugin.cc
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 80288ae

Please sign in to comment.