aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2017-11-16 16:19:44 +0000
committerKostya Kortchinsky <kostyak@google.com>2017-11-16 16:19:44 +0000
commit8562eb32c9a5a44ee1bda92cba825f014d8a5e5a (patch)
tree598081cc2d3194eab68d6b8783b62c3f89f5ca53 /clang/lib/Frontend/FrontendActions.cpp
parentc43622642adf34665d7e03831026c63f409c1f49 (diff)
downloadllvm-8562eb32c9a5a44ee1bda92cba825f014d8a5e5a.zip
llvm-8562eb32c9a5a44ee1bda92cba825f014d8a5e5a.tar.gz
llvm-8562eb32c9a5a44ee1bda92cba825f014d8a5e5a.tar.bz2
[sanitizer] Use runtime checks instead of API level for Android logging
Summary: Recent Bionic have a slew of `async_safe_*` logging functions that are basically the liblog ones but included within the libc. They have the advantage of not allocating memory. `async_safe_write_log` does no formatting and is likely the best candidate for logging. Use a weak definition to try and use it. Also, avoid API level checks (as the toolchain is compiled at a rather low API level) for `__android_log_write` in favor of a weak definition as well. Keep the fallback to `syslog` if nothing else was found. I tried to overhaul the code block to only have a single #if SANITIZER_ANDROID but I am not particularly attached to the form. LMKWYT. Reviewers: eugenis Reviewed By: eugenis Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D40100 llvm-svn: 318410
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
0 files changed, 0 insertions, 0 deletions