Skip to content

Commit 79d0eca

Browse files
committed
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.
1 parent d3305af commit 79d0eca

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

lib/Demangling/Errors.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ static void reportNow(uint32_t flags, const char *message) {
102102
fflush(stderr);
103103
#endif
104104
#if SWIFT_STDLIB_HAS_ASL
105+
#pragma clang diagnostic push
106+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
105107
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
108+
#pragma clang diagnostic pop
106109
#elif defined(__ANDROID__) && !defined(__TERMUX__)
107110
__android_log_print(ANDROID_LOG_FATAL, "SwiftDemangle", "%s", message);
108111
#endif

stdlib/public/Concurrency/Actor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,10 @@ void swift::swift_task_reportUnexpectedExecutor(
426426
fflush(stderr);
427427
#endif
428428
#if SWIFT_STDLIB_HAS_ASL
429+
#pragma clang diagnostic push
430+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
429431
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
432+
#pragma clang diagnostic pop
430433
#elif defined(__ANDROID__)
431434
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
432435
#endif

stdlib/public/Concurrency/TaskGroup.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,10 @@ struct TaskGroupStatus {
594594
write(STDERR_FILENO, message, strlen(message));
595595
#endif
596596
#if defined(SWIFT_STDLIB_HAS_ASL)
597+
#pragma clang diagnostic push
598+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
597599
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
600+
#pragma clang diagnostic pop
598601
#elif defined(__ANDROID__)
599602
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
600603
#endif

stdlib/public/Concurrency/TaskLocal.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,10 @@ static void swift_task_reportIllegalTaskLocalBindingWithinWithTaskGroupImpl(
294294
fflush(stderr);
295295
#endif
296296
#if SWIFT_STDLIB_HAS_ASL
297+
#pragma clang diagnostic push
298+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
297299
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
300+
#pragma clang diagnostic pop
298301
#elif defined(__ANDROID__)
299302
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
300303
#endif

stdlib/public/LLVMSupport/ErrorHandling.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ void error(const char *prefix, const char *msg, const char *file = nullptr, unsi
4141
}
4242

4343
#if SWIFT_STDLIB_HAS_ASL
44+
#pragma clang diagnostic push
45+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
4446
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", buffer);
47+
#pragma clang diagnostic pop
4548
#elif defined(__ANDROID__) && !defined(__TERMUX__)
4649
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", buffer);
4750
#elif defined(_WIN32)

stdlib/public/runtime/Errors.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,10 @@ reportNow(uint32_t flags, const char *message)
313313
fflush(stderr);
314314
#endif
315315
#if SWIFT_STDLIB_HAS_ASL
316+
#pragma clang diagnostic push
317+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
316318
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
319+
#pragma clang diagnostic pop
317320
#elif defined(__ANDROID__)
318321
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", message);
319322
#endif

0 commit comments

Comments
 (0)