Support macOS 11 in our runtime version checking code and update
GetMacosAlignedVersionInternal() accordingly. This follows the
implementation of Triple::getMacOSXVersion() in the Clang driver.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Align implementation with the corresponding change int the
Clang driver (https://reviews.llvm.org/D82337).
We follow the same approach as Triple::getMacOSXVersion().
Other than minor nit LGTM.
compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp | ||
---|---|---|
612–624 | Nit: Could we keep const u16 version_offset = 4 and use? |
compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp | ||
---|---|---|
612–624 | I decided to revert this back to int literals for 2 reasons:
|
compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp | ||
---|---|---|
612–624 |
Is this actually a goal? If it is then a commit message and a comment should explicitly call this out, right now the relationship isn't obvious. However, I'm not convinced trying to stylistically mimic Clang's code is the right thing to do.
I see. I don't think version_offset_pre_macos_11 is that unwieldy but it's your call. If you want to land this as is then I'd like you to add a comment to the source and in the commit message explaining the relationship between Triple::getMacOSXVersion() and this code. |
Nit: Could we keep const u16 version_offset = 4 and use?