Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:37

0001 //===- llvm/TextAPI/Platform.h - Platform -----------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // Defines the Platforms supported by Tapi and helpers.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 #ifndef LLVM_TEXTAPI_PLATFORM_H
0013 #define LLVM_TEXTAPI_PLATFORM_H
0014 
0015 #include "llvm/ADT/SmallSet.h"
0016 #include "llvm/BinaryFormat/MachO.h"
0017 #include "llvm/Support/VersionTuple.h"
0018 
0019 namespace llvm {
0020 namespace MachO {
0021 
0022 using PlatformSet = SmallSet<PlatformType, 3>;
0023 using PlatformVersionSet = SmallSet<std::pair<PlatformType, VersionTuple>, 3>;
0024 
0025 PlatformType mapToPlatformType(PlatformType Platform, bool WantSim);
0026 PlatformType mapToPlatformType(const Triple &Target);
0027 PlatformSet mapToPlatformSet(ArrayRef<Triple> Targets);
0028 StringRef getPlatformName(PlatformType Platform);
0029 PlatformType getPlatformFromName(StringRef Name);
0030 std::string getOSAndEnvironmentName(PlatformType Platform,
0031                                     std::string Version = "");
0032 VersionTuple mapToSupportedOSVersion(const Triple &Triple);
0033 
0034 } // end namespace MachO.
0035 } // end namespace llvm.
0036 
0037 #endif // LLVM_TEXTAPI_PLATFORM_H