Skip to content

Commit 064afb9

Browse files
committed
NFC: Ignore deprecation of asl_log in SourceKit.
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://121076739 to track adoption of `os_log()` if appropriate.
1 parent 3b3abdc commit 064afb9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/SourceKit/lib/Support/Logging.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ Logger::~Logger() {
6666
fprintf(stderr, "%s: %s\n", LoggerName.c_str(), LogMsg.c_str());
6767

6868
#if __APPLE__
69+
// rdar://121076739
70+
#pragma clang diagnostic push
71+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
6972
// Use the Apple System Log facility.
7073
aslclient asl = asl_open(LoggerName.c_str(), "com.apple.console",
7174
ASL_OPT_NO_DELAY);
@@ -76,5 +79,6 @@ Logger::~Logger() {
7679
asl_send(asl, msg);
7780
asl_free(msg);
7881
asl_close(asl);
82+
#pragma clang diagnostic pop
7983
#endif
8084
}

0 commit comments

Comments
 (0)