[Darwin] Switch to new logging api for sanitizers

Switch to new logging api added in [[ https://developer.apple.com/documentation/os/os_log_error | macOS 10.12 ]] that is more memory safe and enables us to label the log messages in the future. Falls back to old API if ran on older OS versions.

Commited by Dan Liew on behalf of Emily Shi.

rdar://25181524

Reviewed By: delcypher, yln

Differential Revision: https://reviews.llvm.org/D95977

GitOrigin-RevId: 039567b664b4e5fad2c6fac1d6f9a6345a15f2d8
1 file changed