diff --git a/objectivec/GPBBootstrap.h b/objectivec/GPBBootstrap.h index ed53ae7cbc..9bce6832b0 100644 --- a/objectivec/GPBBootstrap.h +++ b/objectivec/GPBBootstrap.h @@ -91,6 +91,13 @@ #endif #endif +/** + * Attribute used for Objective-C proto interface deprecations. + **/ +#ifndef GPB_DEPRECATED +#define GPB_DEPRECATED __attribute__((deprecated)) +#endif + // If property name starts with init we need to annotate it to get past ARC. // http://stackoverflow.com/questions/18723226/how-do-i-annotate-an-objective-c-property-with-an-objc-method-family/18723227#18723227 // diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h index 218a31d3f1..ed7b417a9c 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h @@ -167,7 +167,7 @@ string GetOptionalDeprecatedAttribute( isDeprecated = file->options().deprecated(); } if (isDeprecated) { - string result = "DEPRECATED_ATTRIBUTE"; + string result = "GPB_DEPRECATED"; if (preSpace) { result.insert(0, " "); }