diff options
author | Juergen Ributzka <juergen@ributzka.de> | 2022-01-12 14:01:59 -0800 |
---|---|---|
committer | Juergen Ributzka <juergen@ributzka.de> | 2022-01-13 09:23:49 -0800 |
commit | 3025c3ededf955fa7f1da7bd7124346c1693f9f2 (patch) | |
tree | 673f366a650010764d19cc16f9750a0fbe97b8c7 /llvm/lib/TextAPI/TextStub.cpp | |
parent | c7aa8b2962b385dd12602ecb88d176529c2f54bc (diff) | |
download | llvm-3025c3ededf955fa7f1da7bd7124346c1693f9f2.zip llvm-3025c3ededf955fa7f1da7bd7124346c1693f9f2.tar.gz llvm-3025c3ededf955fa7f1da7bd7124346c1693f9f2.tar.bz2 |
Replace PlatformKind with PlatformType.
The PlatformKind/PlatformType enums contain the same information, which requires
them to be kept in-sync. This commit changes over to PlatformType as the sole
source of truth, which allows the removal of the redundant PlatformKind.
The majority of the changes were in LLD and TextAPI.
Reviewed By: cishida
Differential Revision: https://reviews.llvm.org/D117163
Diffstat (limited to 'llvm/lib/TextAPI/TextStub.cpp')
-rw-r--r-- | llvm/lib/TextAPI/TextStub.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp index b64f19a..ff93e43 100644 --- a/llvm/lib/TextAPI/TextStub.cpp +++ b/llvm/lib/TextAPI/TextStub.cpp @@ -380,34 +380,34 @@ template <> struct ScalarTraits<Target> { default: OS << "unknown"; break; - case PlatformKind::macOS: + case PLATFORM_MACOS: OS << "macos"; break; - case PlatformKind::iOS: + case PLATFORM_IOS: OS << "ios"; break; - case PlatformKind::tvOS: + case PLATFORM_TVOS: OS << "tvos"; break; - case PlatformKind::watchOS: + case PLATFORM_WATCHOS: OS << "watchos"; break; - case PlatformKind::bridgeOS: + case PLATFORM_BRIDGEOS: OS << "bridgeos"; break; - case PlatformKind::macCatalyst: + case PLATFORM_MACCATALYST: OS << "maccatalyst"; break; - case PlatformKind::iOSSimulator: + case PLATFORM_IOSSIMULATOR: OS << "ios-simulator"; break; - case PlatformKind::tvOSSimulator: + case PLATFORM_TVOSSIMULATOR: OS << "tvos-simulator"; break; - case PlatformKind::watchOSSimulator: + case PLATFORM_WATCHOSSIMULATOR: OS << "watchos-simulator"; break; - case PlatformKind::driverKit: + case PLATFORM_DRIVERKIT: OS << "driverkit"; break; } @@ -423,7 +423,7 @@ template <> struct ScalarTraits<Target> { Value = *Result; if (Value.Arch == AK_unknown) return "unknown architecture"; - if (Value.Platform == PlatformKind::unknown) + if (Value.Platform == PLATFORM_UNKNOWN) return "unknown platform"; return {}; @@ -597,11 +597,10 @@ template <> struct MappingTraits<const InterfaceFile *> { TargetList Targets; for (auto Platform : Platforms) { - Platform = mapToPlatformKind(Platform, Architectures.hasX86()); + Platform = mapToPlatformType(Platform, Architectures.hasX86()); for (const auto &&Architecture : Architectures) { - if ((Architecture == AK_i386) && - (Platform == PlatformKind::macCatalyst)) + if ((Architecture == AK_i386) && (Platform == PLATFORM_MACCATALYST)) continue; Targets.emplace_back(Architecture, Platform); |