From 3025c3ededf955fa7f1da7bd7124346c1693f9f2 Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Wed, 12 Jan 2022 14:01:59 -0800 Subject: 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 --- llvm/lib/TextAPI/TextStub.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'llvm/lib/TextAPI/TextStub.cpp') 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 { 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 { 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 { 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); -- cgit v1.1