[PATCH] D110289: [libc++] Remove unused macro in __config
Louis Dionne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 05:46:52 PDT 2021
ldionne added a comment.
In D110289#3016525 <https://reviews.llvm.org/D110289#3016525>, @jloser wrote:
> I think it's used in a few places from a quick `git grep`: [...]
`__MAC_OS_X_VERSION_MIN_REQUIRED` is defined by Apple's `<Availability.h>`. It is equivalent to `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__`, which is set by the compiler. I suspect libc++ was defining it at some point for internal use (e.g. in the code I removed in https://reviews.llvm.org/rGebaf1d5e2b87), but now it's not needed anymore.
> This is safe for `libc++` use, so LGTM since CI is passing. As an aside, it looks like there are a few other spots in `llvm` that could benefit from the removal too:
>
> git grep '__MAC_OS_X_VERSION_MIN_REQUIRED'
> clang-tools-extra/clangd/unittests/JSONTransportTests.cpp:#if !(defined(_WIN32) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
> clang-tools-extra/clangd/unittests/JSONTransportTests.cpp: __MAC_OS_X_VERSION_MIN_REQUIRED < 101300))
> llvm/lib/Support/LockFileManager.cpp:#if defined(__APPLE__) && defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (__MAC_OS_X_VERSION_MIN_REQUIRED > 1050)
Good point -- those could either have been using the value defined in `<Availability.h>` or unknowingly using the one set by libc++. I'll move those over to `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__`, which is always defined by the compiler.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110289/new/
https://reviews.llvm.org/D110289
More information about the llvm-commits
mailing list