Add availability checks to the os_signpost code so this can be enabled with an older deployment target.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM with a couple nitpicks
llvm/lib/Support/Signposts.cpp | ||
---|---|---|
52 | We might want to wrap the version list in a macro so we don't have to dupe it in each function. I'm thinking something along the lines of: #define SIGNPOSTS_AVAILABLE() __builtin_available(macos 10.14, iOS 12, tvOS 12, watchOS 5, *) | |
55 | Do we still need to insert it when signposts aren't available? The call to getSignpostForObject() isn't reachable in that case | |
70 | Is this needed? isEnabled() will be false but I can believe the warning isn't smart enough to see that. |
llvm/lib/Support/Signposts.cpp | ||
---|---|---|
70 | Yep, in both cases the compiler isn't smart enough. |
We might want to wrap the version list in a macro so we don't have to dupe it in each function. I'm thinking something along the lines of: