mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 19:46:07 +00:00
[lld-macho] Change constant std::vector to std::array (NFC)
This commit is contained in:
parent
8534f51474
commit
4f688d00f4
@ -925,12 +925,12 @@ PlatformType macho::removeSimulator(PlatformType platform) {
|
||||
}
|
||||
|
||||
static bool dataConstDefault(const InputArgList &args) {
|
||||
static const std::vector<std::pair<PlatformType, VersionTuple>> minVersion = {
|
||||
{PLATFORM_MACOS, VersionTuple(10, 15)},
|
||||
{PLATFORM_IOS, VersionTuple(13, 0)},
|
||||
{PLATFORM_TVOS, VersionTuple(13, 0)},
|
||||
{PLATFORM_WATCHOS, VersionTuple(6, 0)},
|
||||
{PLATFORM_BRIDGEOS, VersionTuple(4, 0)}};
|
||||
static const std::array<std::pair<PlatformType, VersionTuple>, 5> minVersion =
|
||||
{{{PLATFORM_MACOS, VersionTuple(10, 15)},
|
||||
{PLATFORM_IOS, VersionTuple(13, 0)},
|
||||
{PLATFORM_TVOS, VersionTuple(13, 0)},
|
||||
{PLATFORM_WATCHOS, VersionTuple(6, 0)},
|
||||
{PLATFORM_BRIDGEOS, VersionTuple(4, 0)}}};
|
||||
PlatformType platform = removeSimulator(config->platformInfo.target.Platform);
|
||||
auto it = llvm::find_if(minVersion,
|
||||
[&](const auto &p) { return p.first == platform; });
|
||||
|
@ -680,14 +680,14 @@ void Writer::scanSymbols() {
|
||||
|
||||
// TODO: ld64 enforces the old load commands in a few other cases.
|
||||
static bool useLCBuildVersion(const PlatformInfo &platformInfo) {
|
||||
static const std::vector<std::pair<PlatformType, VersionTuple>> minVersion = {
|
||||
{PLATFORM_MACOS, VersionTuple(10, 14)},
|
||||
{PLATFORM_IOS, VersionTuple(12, 0)},
|
||||
{PLATFORM_IOSSIMULATOR, VersionTuple(13, 0)},
|
||||
{PLATFORM_TVOS, VersionTuple(12, 0)},
|
||||
{PLATFORM_TVOSSIMULATOR, VersionTuple(13, 0)},
|
||||
{PLATFORM_WATCHOS, VersionTuple(5, 0)},
|
||||
{PLATFORM_WATCHOSSIMULATOR, VersionTuple(6, 0)}};
|
||||
static const std::array<std::pair<PlatformType, VersionTuple>, 7> minVersion =
|
||||
{{{PLATFORM_MACOS, VersionTuple(10, 14)},
|
||||
{PLATFORM_IOS, VersionTuple(12, 0)},
|
||||
{PLATFORM_IOSSIMULATOR, VersionTuple(13, 0)},
|
||||
{PLATFORM_TVOS, VersionTuple(12, 0)},
|
||||
{PLATFORM_TVOSSIMULATOR, VersionTuple(13, 0)},
|
||||
{PLATFORM_WATCHOS, VersionTuple(5, 0)},
|
||||
{PLATFORM_WATCHOSSIMULATOR, VersionTuple(6, 0)}}};
|
||||
auto it = llvm::find_if(minVersion, [&](const auto &p) {
|
||||
return p.first == platformInfo.target.Platform;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user