[PATCH] D97410: [llvm] Check availability for os_signpost
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 16:22:48 PST 2021
JDevlieghere marked 3 inline comments as done.
JDevlieghere added inline comments.
================
Comment at: llvm/lib/Support/Signposts.cpp:70
if (isEnabled()) {
- // Both strings used here are required to be constant literal strings.
- os_signpost_interval_begin(getLogger(), getSignpostForObject(O),
- "LLVM Timers", "Begin %s", Name.data());
+ if (__builtin_available(macos 10.14, iOS 12, tvOS 12, watchOS 5, *)) {
+ // Both strings used here are required to be constant literal strings.
----------------
dsanders wrote:
> Is this needed? isEnabled() will be false but I can believe the warning isn't smart enough to see that.
Yep, in both cases the compiler isn't smart enough.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97410/new/
https://reviews.llvm.org/D97410
More information about the llvm-commits
mailing list