1 //===- llvm/TextAPI/MachO/Platform.h - Platform -----------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // Defines the Platforms supported by Tapi and helpers.
11 //===----------------------------------------------------------------------===//
12 #ifndef LLVM_TEXTAPI_MACHO_PLATFORM_H
13 #define LLVM_TEXTAPI_MACHO_PLATFORM_H
15 #include "llvm/ADT/SmallSet.h"
16 #include "llvm/BinaryFormat/MachO.h"
21 /// Defines the list of MachO platforms.
22 enum class PlatformKind
: unsigned {
24 macOS
= MachO::PLATFORM_MACOS
,
25 iOS
= MachO::PLATFORM_IOS
,
26 tvOS
= MachO::PLATFORM_TVOS
,
27 watchOS
= MachO::PLATFORM_WATCHOS
,
28 bridgeOS
= MachO::PLATFORM_BRIDGEOS
31 using PlatformSet
= SmallSet
<PlatformKind
, 3>;
33 PlatformKind
mapToPlatformKind(const Triple
&Target
);
34 PlatformSet
mapToPlatformSet(ArrayRef
<Triple
> Targets
);
35 StringRef
getPlatformName(PlatformKind Platform
);
37 } // end namespace MachO.
38 } // end namespace llvm.
40 #endif // LLVM_TEXTAPI_MACHO_PLATFORM_H