mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
NFC: Ignore deprecation of asl_log in the runtime and demangling library.
ASL is deprecated in macOS 10.12. It may be time to transition to os_log now that deployment targets have been raised to 10.12, but until that project starts these warnings are just pollution. Filed rdar://121066531 to track adoption of `os_log()` if appropriate.
This commit is contained in:
@@ -102,7 +102,10 @@ static void reportNow(uint32_t flags, const char *message) {
|
||||
fflush(stderr);
|
||||
#endif
|
||||
#if SWIFT_STDLIB_HAS_ASL
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
__android_log_print(ANDROID_LOG_FATAL, "SwiftDemangle", "%s", message);
|
||||
#endif
|
||||
|
||||
@@ -426,7 +426,10 @@ void swift::swift_task_reportUnexpectedExecutor(
|
||||
fflush(stderr);
|
||||
#endif
|
||||
#if SWIFT_STDLIB_HAS_ASL
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
|
||||
#endif
|
||||
|
||||
@@ -594,7 +594,10 @@ struct TaskGroupStatus {
|
||||
write(STDERR_FILENO, message, strlen(message));
|
||||
#endif
|
||||
#if defined(SWIFT_STDLIB_HAS_ASL)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
|
||||
#endif
|
||||
|
||||
@@ -294,7 +294,10 @@ static void swift_task_reportIllegalTaskLocalBindingWithinWithTaskGroupImpl(
|
||||
fflush(stderr);
|
||||
#endif
|
||||
#if SWIFT_STDLIB_HAS_ASL
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,10 @@ void error(const char *prefix, const char *msg, const char *file = nullptr, unsi
|
||||
}
|
||||
|
||||
#if SWIFT_STDLIB_HAS_ASL
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", buffer);
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", buffer);
|
||||
#elif defined(_WIN32)
|
||||
|
||||
@@ -313,7 +313,10 @@ reportNow(uint32_t flags, const char *message)
|
||||
fflush(stderr);
|
||||
#endif
|
||||
#if SWIFT_STDLIB_HAS_ASL
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user