aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_generator.cc')
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_generator.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_generator.cc b/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
index 85e438f4..375b4e0f 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
@@ -34,7 +34,6 @@
#include <google/protobuf/compiler/objectivec/objectivec_helpers.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>
-#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/stubs/strutil.h>
namespace google {
@@ -58,8 +57,13 @@ bool ObjectiveCGenerator::Generate(const FileDescriptor* file,
return false;
}
- FileGenerator file_generator(file);
+ // Validate the objc prefix/package pairing.
+ if (!ValidateObjCClassPrefix(file, error)) {
+ // *error will have been filled in.
+ return false;
+ }
+ FileGenerator file_generator(file);
string filepath = FilePath(file);
// Generate header.