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/tools/llvm-ifs/llvm-ifs.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/tools/llvm-ifs/llvm-ifs.cpp')
-rw-r--r-- | llvm/tools/llvm-ifs/llvm-ifs.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/tools/llvm-ifs/llvm-ifs.cpp b/llvm/tools/llvm-ifs/llvm-ifs.cpp index 0792066..2dcd0c5 100644 --- a/llvm/tools/llvm-ifs/llvm-ifs.cpp +++ b/llvm/tools/llvm-ifs/llvm-ifs.cpp @@ -198,26 +198,26 @@ static Expected<std::unique_ptr<IFSStub>> readInputFile(StringRef FilePath) { static int writeTbdStub(const Triple &T, const std::vector<IFSSymbol> &Symbols, const StringRef Format, raw_ostream &Out) { - auto PlatformKindOrError = - [](const llvm::Triple &T) -> llvm::Expected<llvm::MachO::PlatformKind> { + auto PlatformTypeOrError = + [](const llvm::Triple &T) -> llvm::Expected<llvm::MachO::PlatformType> { if (T.isMacOSX()) - return llvm::MachO::PlatformKind::macOS; + return llvm::MachO::PLATFORM_MACOS; if (T.isTvOS()) - return llvm::MachO::PlatformKind::tvOS; + return llvm::MachO::PLATFORM_TVOS; if (T.isWatchOS()) - return llvm::MachO::PlatformKind::watchOS; + return llvm::MachO::PLATFORM_WATCHOS; // Note: put isiOS last because tvOS and watchOS are also iOS according // to the Triple. if (T.isiOS()) - return llvm::MachO::PlatformKind::iOS; + return llvm::MachO::PLATFORM_IOS; return createStringError(errc::not_supported, "Invalid Platform.\n"); }(T); - if (!PlatformKindOrError) + if (!PlatformTypeOrError) return -1; - PlatformKind Plat = PlatformKindOrError.get(); + PlatformType Plat = PlatformTypeOrError.get(); TargetList Targets({Target(llvm::MachO::mapToArchitecture(T), Plat)}); InterfaceFile File; |