1//===- llvm/TextAPI/Platform.h - Platform -----------------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8//
9// Defines the Platforms supported by Tapi and helpers.
10//
11//===----------------------------------------------------------------------===//
12#ifndef LLVM_TEXTAPI_PLATFORM_H
13#define LLVM_TEXTAPI_PLATFORM_H
14
15#include "llvm/ADT/SmallSet.h"
16#include "llvm/BinaryFormat/MachO.h"
17#include "llvm/Support/VersionTuple.h"
18
19namespace llvm {
20namespace MachO {
21
22using PlatformSet = SmallSet<PlatformType, 3>;
23using PlatformVersionSet = SmallSet<std::pair<PlatformType, VersionTuple>, 3>;
24
25PlatformType mapToPlatformType(PlatformType Platform, bool WantSim);
26PlatformType mapToPlatformType(const Triple &Target);
27PlatformSet mapToPlatformSet(ArrayRef<Triple> Targets);
28StringRef getPlatformName(PlatformType Platform);
29PlatformType getPlatformFromName(StringRef Name);
30std::string getOSAndEnvironmentName(PlatformType Platform,
31 std::string Version = "");
32VersionTuple mapToSupportedOSVersion(const Triple &Triple);
33
34} // end namespace MachO.
35} // end namespace llvm.
36
37#endif // LLVM_TEXTAPI_PLATFORM_H
38

source code of llvm/include/llvm/TextAPI/Platform.h