Adding the concept of external deprecations.
An externally deprecated definition is marked deprecated for external clients only. This allows the framework implementation to use the definition without receiving deprecation warnings/errors. Issue: PLCR-543
This commit is contained in:
Родитель
c8598bf80b
Коммит
d2701017b8
|
@ -4361,6 +4361,7 @@
|
|||
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/Source/PLCrashNamespace.h";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = PLCR_PRIVATE;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/Dependencies/protobuf-2.0.3/include\"";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
|
@ -4392,6 +4393,7 @@
|
|||
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/Source/PLCrashNamespace.h";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = PLCR_PRIVATE;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/$(DERIVED_FILES_DIR)\"",
|
||||
|
|
|
@ -565,20 +565,7 @@ static size_t plcrash_writer_write_system_info (plcrash_async_file_t *file, plcr
|
|||
rv += plcrash_writer_pack(file, PLCRASH_PROTO_SYSTEM_INFO_OS_BUILD_ID, PLPROTOBUF_C_TYPE_STRING, writer->system_info.build);
|
||||
|
||||
/* Machine type */
|
||||
#ifdef __x86_64__
|
||||
enumval = PLCrashReportArchitectureX86_64;
|
||||
#elif defined(__i386__)
|
||||
enumval = PLCrashReportArchitectureX86_32;
|
||||
#elif defined(__ARM_ARCH_6K__)
|
||||
enumval = PLCrashReportArchitectureARMv6;
|
||||
#elif defined(__ARM_ARCH_7A__)
|
||||
enumval = PLCrashReportArchitectureARMv7;
|
||||
#elif defined(__ppc__)
|
||||
enumval = PLCrashReportArchitecturePPC;
|
||||
#else
|
||||
enumval = PLCrashReportArchitectureUnknown;
|
||||
#endif
|
||||
|
||||
enumval = PLCrashReportHostArchitecture;
|
||||
rv += plcrash_writer_pack(file, PLCRASH_PROTO_SYSTEM_INFO_ARCHITECTURE_TYPE_ID, PLPROTOBUF_C_TYPE_ENUM, &enumval);
|
||||
|
||||
/* Timestamp */
|
||||
|
|
|
@ -51,4 +51,34 @@
|
|||
# define PLCR_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifdef PLCR_PRIVATE
|
||||
/**
|
||||
* Marks a definition as deprecated only for for external clients, allowing
|
||||
* uses of it internal fo the framework.
|
||||
*/
|
||||
#define PLCR_EXTERNAL_DEPRECATED
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* A macro to put above a definition marked PLCR_EXTERNAL_DEPRECATED that will
|
||||
* silence warnings about there being a deprecation documentation marker but the
|
||||
* definition not being marked deprecated.
|
||||
*/
|
||||
# define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH() \
|
||||
PLCR_PRAGMA_CLANG("clang diagnostic push"); \
|
||||
PLCR_PRAGMA_CLANG("clang diagnostic ignored \"-Wdocumentation-deprecated-sync\"")
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* A macro to put below a definition marked PLCR_EXTERNAL_DEPRECATED that will
|
||||
* silence warnings about there being a deprecation documentation marker but the
|
||||
* definition not being marked deprecated.
|
||||
*/
|
||||
# define PLCR_EXTERNAL_DEPRECATED_NOWARN_POP() PLCR_PRAGMA_CLANG("clang diagnostic pop")
|
||||
#else
|
||||
# define PLCR_EXTERNAL_DEPRECATED PLCR_DEPRECATED
|
||||
# define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH()
|
||||
# define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH()
|
||||
#endif /* PLCR_PRIVATE */
|
||||
|
||||
#endif /* PLCRASH_CONSTANTS_H */
|
||||
|
|
|
@ -96,7 +96,9 @@ typedef enum {
|
|||
|
||||
|
||||
extern PLCrashReportOperatingSystem PLCrashReportHostOperatingSystem;
|
||||
extern PLCrashReportArchitecture PLCrashReportHostArchitecture PLCR_DEPRECATED;
|
||||
PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH();
|
||||
extern PLCrashReportArchitecture PLCrashReportHostArchitecture PLCR_EXTERNAL_DEPRECATED;
|
||||
PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH();
|
||||
|
||||
@interface PLCrashReportSystemInfo : NSObject {
|
||||
@private
|
||||
|
|
Загрузка…
Ссылка в новой задаче